From: Fernando Yuji Ono on
I made a graph, which represents the power consumed in a house in each minute.
So when i do this:

plot(x,Power(x))

I get a graph whose x axis varies from 0 to 1440 (=24*60).
But I'd like the graph to show that the x axis range goes from 0 to 23. Is there any way to do that?


Message was edited by: Fernando Yuji Ono

From: Walter Roberson on
Fernando Yuji Ono wrote:
> I made a graph, which represents the power consumed in a house in each minute.
> So when i do this:
>
> plot(x,Power(x))
>
> I get a graph whose x axis varies from 0 to 1440 (=24*60).
> But I'd like the graph to show that the x axis range goes from 0 to 23. Is there any way to do that?

Check out datetick()
From: Fernando Yuji Ono on
Just replying to say thanks!
From: Jan Simon on
Dear Fernando,

> I made a graph, which represents the power consumed in a house in each minute.
> plot(x,Power(x))
> I get a graph whose x axis varies from 0 to 1440 (=24*60).
> But I'd like the graph to show that the x axis range goes from 0 to 23. Is there any way to do that?

I'd expect values from 0 to 1439. Anyhow, you could divide x by 60:
plot(x / 60, Power(x))

Kind regards, Jan

PS. To my surprise this is almost the same answer I gave some seconds ago:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/286631
From: Fernando Yuji Ono on
Oh that's right, it is 0~1439. Thanks Jan.