Index in position 2 exceeds array bounds (must not exceed 1).
1 回表示 (過去 30 日間)
古いコメントを表示
gcf;
subplot(3,1,1)
plot(Y(:,1),Y(:,2))
title('source current')
ylabel('iS in A')
subplot(3,1,2)
plot(Y(:,1),Y(:,3))
title('capacitor voltage')
ylabel('vC in V')
subplot(3,1,3)
plot(Y(:,1),Y(:,4))
title('inductor current')
xlabel('time in sec.')
ylabel('iL in A')
Index in position 2 exceeds array bounds (must not exceed 1).
Error in (line 3)
plot(Y(:,1),Y(:,2))
2 件のコメント
回答 (1 件)
Mahesh Taparia
2021 年 1 月 28 日
Hi
It seems Y is not defined correctly. Either it is a single column matrix or just a scalar. So assign the value correctly.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Two y-axis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!