I need some help with the linspace function
显示 更早的评论
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)
回答(1 个)
Benjamin Drewry
2022-10-19
0 个投票
Replace 'diff' with 'gradient' to prevent vector mismatches and errors to the plot call
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!