Why the line is not shown in the graph?

1 view (last 30 days)
Nurul Shahizan Rudzuanazmi
Edited: Rik on 5 Feb 2020
I am about to make "for loop" and plot 2 functions against frequency. When I run the code there is no error stated however, when the graph's window pop out it gives no result (blank graph). Is there anything that I miss in my loop? Or anything that I have to improve in the code?
Screenshot 2020-02-05 at 20.42.47.png

Answers (1)

Rik
Rik on 5 Feb 2020
Edited: Rik on 5 Feb 2020
You are not indexing the trans variable inside your loop, which results in you overwriting the value every loop iteration. That means you are plotting a vector with a scalar, which you don't see, because you haven't set a marker.
Untitled.png

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!