I want to know the value of x for each value of V
1 view (last 30 days)
Show older comments
V=[2,4,5,6,7]
for i=1:numel(V)
x(i)=(2+4*7+8-9*6+x(i))/(3+4*6*V(i)+3*x(i))
end
2 Comments
the cyclist
on 10 Feb 2021
Can you please use more than one sentence to describe what you are trying to do? You have not given enough information for us to help you.
Answers (1)
Cris LaPierre
on 10 Feb 2021
Edited: Cris LaPierre
on 10 Feb 2021
You are using x to calculate x. This is causing an error since x doesn't exist yet.
What is the equation you are trying to implement in MATLAB?
2 Comments
Cris LaPierre
on 10 Feb 2021
V=[2,4,5,6,7];
fp=fplot(@(x)(2+4*7+8-9*6+x)./(3+4*6*V+3*x))
legend("V="+num2str(V'))
Use the plot object to get the x and y data of each line. For example
x1 = fp(1).XData
y1 = fp(1).YData
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!