How can i change values for my data in plot axis?
5 views (last 30 days)
i think first i will show you my Matlab code and plot and then i can ask my question;
nx=10; nxp=nx+1; dx=L/nx; td=12*3600;
plot(t,T); hold on; xlabel('time (t)');
i have two questions
1. In the X-axis, the time is shown in seconds because the formulas work in second but I have to show the x-axis as per hour so basically I need the x-axis as 1 2 3 .. 12 instead of 1x10^4.
2. then I need to label each curve.
Thanks in advance for help.
Shoaibur Rahman on 28 Dec 2014
Replace t in plot by t/3600, that converts t from second to hour
Add a text command with appropriate coordinate of the location of curve labels. I keep that at the end of each curve. Also name your curve as required; I use the curve 1, curve 2... To make the curves' labels more inside the plot, define xlim.
plot(t/3600,T); hold on; xlabel('time (t)'); ylabel('Surface Temperature(Ts)')