I want to know the value of x for each value of V
조회 수: 4 (최근 30일)
이전 댓글 표시
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
the cyclist
2021년 2월 10일
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.
답변 (1개)
Cris LaPierre
2021년 2월 10일
편집: Cris LaPierre
2021년 2월 10일
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
Cris LaPierre
2021년 2월 10일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
