Solution and Answer Guide: Chapman, MATLAB Programming for Engineers, 7e, CY2025, 9798214001531; Chapter 1:
Solution and Answer Guide
Chapman, MATLAB Programming for Engineers, 7e, CY2025, 9798214001531; Chapter 1:
1 Introduction to MATLAB
1.1 The following MATLAB statements plot the function y( x) = 4e−0.3x for the range
0 x 10 .
x = 0:0.1:10;
y = 4 * exp( -0.3 * x);
plot(x,y);
Use the MATLAB Edit/Debug Window to create a new empty script, type these
statements into the script, and save the file with the name test1.m. Then, execute the
program by typing the name test1 in the Command Window or clicking the Run
button. What result do you get?
Solution
When these statements are executed, the results are as shown below:
4
(d) v2
3
(e) u v +1
v+u
(f) log10
v−u
Solution
>> u=1;
>> v=3;
>> (4*u) / (3*v)
ans =
0.4444
>> (2*v^-2) / (u+v)^2
ans =
0.0139
>> v^3/(v^3 - u^3)
ans =
1.0385
>> (4/3)*pi*v^2
ans =
37.6991
>> u*sqrt(v) + 1
ans =
2.7321
>> log10( (v+u) / (v-u) )
ans =
0.3010
1.6 Evaluate the expressions in Exercise 1.5 by creating a single script file that calculates and
displays all six results. Execute the script file and observe the results.
Solution
An appropriate script file named test.m is shown below:
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller solutions. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $18.48. You're not tied to anything after your purchase.