how to plot graph decimal points?
Show older comments
i want to plot a graph having values like-
x axis 0:10:100
y axis [26.34 25.66 21.86 18.21 15.04 11.08 9.93 8.68 6.65]
i am getting error like vector should be or same length. what does it mean and how to solve
i am new to matlab
Answers (1)
Walter Roberson
on 12 Mar 2016
0 votes
Match the values up. You are asking that y = 26.34 for x =0, that y = 25.66 for x = 10, that y = 21.86 for x = 20, that y = 18.21 for x = 30, that y = 15.04 for x = 40, that y = 11.08 for x = 50, that y = 9.93 for x = 60, that y = 8.68 for x = 70, that y = 6.65 for x = 80. You have now run out of y, but you still have x = 90 and x = 100 to plot for. What y value are you expecting for x = 90 and x = 100?
Categories
Find more on Graph and Network Algorithms 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!