Why the plot window is empty ?
显示 更早的评论
Hi Guys I wrote a code and I want to plot it as shown, but it gives me an empty plot. No curves just the x and y-axis .Any answers?

4 个评论
KVM
2017-11-29
t = linspace(0,100,1) only gives 1 point. Take a closer look to your "t". You probably only have 1 value. So you won't have a plot with only 1 point...Why not using something like: t= [1:1:100]
Rik
2017-11-29
Why suggest that syntax if you can suggest t=1:100? Shorter and more readable.
Using colon notation is best when you know a start and a step, using linspace is best when the step doesn't matter, but the number of steps do.
Connor Ferster
2017-11-30
The comments above, plus, your V is currently equal to zero so you wouldn't even see a point on the plot.
KSSV
2017-11-30
Don't attach screen shot..attach your code.....
回答(1 个)
1 个评论
Jan
2017-12-1
"It should not graph like this"? Matlab does exactly, what you instruct it to do. If you expect something else, either the code or the expectations are wrong.
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
