how to scale values while plotting graphs in matlab
Show older comments
in my program i have to read a variable from an excel sheet of size 3600sec*24hrs.(column wise)
GDOP1=[]
GDOP=xlsread('positions.xlsx','GDOP'); => size=3600*24
for j=1:1
GDOP1=[GDOP1 GDOP(j:end)] =>size=1*86400(i.e one day data in sec)
end
now my problem is to plot this data(GDOP1) on y-axis against time on x axis in the form of 0 to 24hrs rather than from 0 to 86400 seconds
6 Comments
Star Strider
on 22 Mar 2015
It appears that you have data collected every second for 24 hours.
What do you mean by ‘scale this data(GDOP1) from 0 to 24hrs’. How do you want to ‘scale’ it?
Divya
on 22 Mar 2015
Image Analyst
on 22 Mar 2015
How are you plotting it? Which variable, or column, is x and which is y?
Divya
on 22 Mar 2015
Image Analyst
on 22 Mar 2015
That didn't answer a single one of my questions. I was expecting something like "the y values are in column 2 of GDOP1, and the x values are in column 1 but are in units of seconds instead of hours like I want. I'm plotting them like this
x = GDOP1(:, 1);
y = GDOP1(:, 2);
plot(x, y, 'b-');
Now, can you try again? Or, for bonus points, attach your workbook?
Divya
on 22 Mar 2015
Accepted Answer
More Answers (0)
Categories
Find more on Modeling 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!