Why won't Matlab plot anything?
显示 更早的评论
采纳的回答
更多回答(4 个)
Mitchell Frisch
2019-4-19
Try adding a line style to your plot function, such as
plot(x, y 'b-')
I've had a similar problem and this fixed it for me
2 个评论
atousa yazdani
2022-4-27
hasn't helped me!
Walter Roberson
2022-4-27
You do not appear to have posted your code, which makes it difficult for us to tell you how to repair it. It is not at all productive for us to list all of the different ways that can possibly lead to a plot not working as expected.
Megat
2023-5-23
0 个投票
q=5; s=0.002; b=20; n=0.03;
g=@(f) ((s*sqrt)*(b*h)^(5/3))/(n*(b+2*h)^(2/3))-q;
fplot(g,[0 1]), grid, xlabel('f'), ylabel('g(f)')
why it show nothing
1 个评论
DGM
2023-5-24
You should get an error message that tells you why.
You created g as a function of f, but not only is it invariant on f, it's a function of h, which is undefined.
Sanjay
2025-2-7
0 个投票
I use ubuntu operating system. For opening Matlab R2024b I run "/home/user/Documents/MatLab/bin/matlab" as matlab is installed in the "Documents/MatLab" folder. Now for opening plots just add "-softwareopengl" to it. So as a whole the code is "/home/sanjay/Documents/MatLab/bin/matlab -softwareopengl"
类别
在 帮助中心 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!