Issue with plotting variables with ranges

1 回表示 (過去 30 日間)
bella bridges
bella bridges 2021 年 4 月 3 日
コメント済み: bella bridges 2021 年 4 月 3 日
Hi, I am trying to plot these three equations. They should form a sort of triangle. The main issue I am having is trying to enter the equations, which have variables with ranges.
% x is x/c
assume(0<=x<=.1)
Cpu1=1-300*(x)^2
Here is me trying the first one, but it doesn't give me any values. Not sure the best way to do this. Any help would be greatly appreciated!

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 4 月 3 日
Here is how to start this:
N = 200; % Number of data points to be genearted and calculated to plot
xc=linspace(0, .1, N);
Cpu=1-300*xc.^2;
xc2 = linspace(.101, 1, N);
Cpu2 = -2.777+2.777*xc2;
xc3 = linspace(0, 1, N);
Cl = 1-.95*xc3;
% the rest is to plot the above data
plot(xc, Cpu, 'b-o'), hold on;
plot(xc2, Cpu2, 'r-x')
plot(xc3, Cl, 'k-')
Good luck
  1 件のコメント
bella bridges
bella bridges 2021 年 4 月 3 日
Very helpful. Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by