plot a graph in intagrl2

2 views (last 30 days)
Vu Hai Duong
Vu Hai Duong on 18 May 2019
Commented: Vu Hai Duong on 18 May 2019
syms x y real
fun = x
y1 = x
y2 = cos (x)
b= solve (y1==y2);
Volumeofsolid = int(int(fun,y,y1,y2),x,0,b)
x = linspace (0,b,25)
% Please teach me how to assign the value of x to y1
y = linspace (y1,y2,25)
plot(x,y)
  1 Comment
Walter Roberson
Walter Roberson on 18 May 2019
You defined x as a vector of lengh 25. If you substitute that vector into your y1 and y2 formula, then that would be something that you could not linspace()

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 18 May 2019
I am going to guess:
plot(x,subs([y1;y2]).')

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!