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일
Replace
mf = [mf1 mf2 mf3];
by
mf = [mf1; mf2; mf3];

카테고리

도움말 센터File Exchange에서 2-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