MATLAB Answers

0

Write a MATLAB®

Asked by Pamela Aquino on 20 Apr 2019
Latest activity Commented on by Walter Roberson
on 20 Apr 2019
Write a MATLAB® script to graph the variable (𝒚) vs. the variable (𝒙). . [2 Pts] 𝒚 = 𝟎. 𝟒 √𝟏. 𝟖 𝒙 for 𝟎 ≤ 𝒙 ≤ 𝟑𝟓

Tags

1 Answer

Answer by Clay Swackhamer on 20 Apr 2019

Hi Pamela,
Here is the gist, but with a different function. I can see that this problem is worth 2 points, so I won't do your homework for you. This will be close enough for you to get the basics of plotting and then apply it to your own problem.
x = 0:0.1:100; %make x values to put into the function
y = sin(x)+5+1e-3*x.^2; %evaluate the function on the x values we just made
plot(x, y, 'LineWidth', 2) %plot y vs x
ylabel('y')
xlabel('x')
simple function plot.png

  0 Comments

Sign in to comment.