Error using plot Vectors must be the same length.

x = -10:0.4:10;
b = 2;c = 0;
mf1 = gbellmf(x,[2 b c]);
mf2 = gbellmf(x,[4 b c]);
mf3 = gbellmf(x,[6 b c]);
mf = [mf1 mf2 mf3];
subplot(221);
plot(x, mf);
title('(a) Changing "a"'); axis([-inf inf 0 1.2]);

回答 (1 件)

Torsten
Torsten 2022 年 11 月 5 日

0 投票

Replace
mf = [mf1 mf2 mf3];
by
mf = [mf1; mf2; mf3];

1 件のコメント

nouf attar
nouf attar 2022 年 11 月 5 日
thank you so much. it worked

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

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

2022 年 11 月 5 日

コメント済み:

2022 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by