I need some help with the linspace function
3 ビュー (過去 30 日間)
古いコメントを表示
Hey everyone, so whenever I run my code I get "Error using plot Vectors must be the same length" so I tried using linspace but it's still not working. Could I get some help?
T = linspace(1,99,length(diff_M))
M = 1./T;
diff_M3 = diff(M3)
plot(diff_M,T)
2 件のコメント
回答 (1 件)
Benjamin Drewry
2022 年 10 月 19 日
Replace 'diff' with 'gradient' to prevent vector mismatches and errors to the plot call
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!