How plot 2d of more than 3 function and substitute the number in each function separate parameter?

How i can plot 2D of thus function and in each function susbtitute the value m seperatly with different color ? like this example
y1=real(((-0.385e1 * tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) ^ (0.1e1 / m / 0.2e1)) * exp(i * (0.431e1 * t - 0.282e1)));
y2=real(((-0.385e1 * tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) ^ (0.1e1 / m / 0.2e1)) * exp(i * (0.431e1 * t - 0.282e1)));
y3=real(((-0.385e1 * tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) ^ (0.1e1 / m / 0.2e1)) * exp(i * (0.431e1 * t - 0.282e1)));
y4=real(((-0.385e1 * tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) ^ (0.1e1 / m / 0.2e1)) * exp(i * (0.431e1 * t - 0.282e1)));
y5=real(((-0.385e1 * tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) ^ (0.1e1 / m / 0.2e1)) * exp(i * (0.431e1 * t - 0.282e1)));

5 件のコメント

Are you going to ask to delete this question too?
salim
salim 2025 年 2 月 7 日
@Walter Roberson ofcurse not, i already explain why i did that , please give me the best option and also this equation have same problem i must add . for each * and /
Seems to me your reasons for posting this current question might turn out to be the same as for posting your previous question, so it is fair to ask again, "Are you going to ask to delete this question too?"
I have already been forced to act as an unpaid free software consultant once, so it is only natural for me to ask for proof that you do not intend to delete this current question.
salim
salim 2025 年 2 月 8 日
編集済み: salim 2025 年 2 月 8 日
@Walter Roberson i don't delete this question ! and other too why i do that i am not sick
salim
salim 2025 年 2 月 8 日
@Walter Roberson can do somehting special or not?

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

 採用された回答

y=@(x,t,m)real(((-0.385e1 .* tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) .^ (0.1e1 ./ m ./ 0.2e1)) .* exp(i * (0.431e1 * t - 0.282e1)));
x = (0:0.1:2).';
t = 1;
m = 0.5:0.5:3;
plot(x,y(x,t,m))
xlabel('x')
ylabel('y')
legend('m=0.5','m=1','m=1.5','m=2','m=2.5','m=3')

2 件のコメント

salim
salim 2025 年 2 月 7 日
編集済み: salim 2025 年 2 月 7 日
@Torsten can i make the line a little bit begger and make them like a dash - - - - i can't apply for all of them in one graph i need add option and make it save for all future graph
Torsten
Torsten 2025 年 2 月 7 日
All the plot options are listed in the section "Input Arguments" under
Read about "LineSpec" and "LineWidth".

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

製品

リリース

R2021b

タグ

質問済み:

2025 年 2 月 7 日

コメント済み:

2025 年 2 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by