I want to know the value of x for each value of V
1 回表示 (過去 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
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!