Limit plot's x-axis to number of rows in a specified vector
1 回表示 (過去 30 日間)
古いコメントを表示
Hello All,
I've got an easy one for you:
I want to limit the x-axis on a plot from 0 to the total number of rows in the "A" vector. Code so far is:
xlim(0, ______ );
I'm going to file this one in the too-fried-at-the-moment category.
0 件のコメント
採用された回答
Star Strider
2016 年 12 月 21 日
編集済み: Star Strider
2016 年 12 月 21 日
Assuming you’re plotting by indices:
axis([0 length(A) ylim])
or:
set(gca, 'XLim',[0 length(A)])
If you want to use the last value in ‘A’, replace ‘length(A)’ with ‘A(end)’ in those function calls.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!