Using XTick and Xticklabel to change the labels

1 view (last 30 days)
Example
soll = dsolve('DQ=(300*.01)-(300*(Q/1000000))','Q(0) = 0', 't');
x = (subs(soll, 't', 8760));
soll2 = dsolve('DQ= -(300*(Q/1000000))','Q(8760) = (10000 - 10000*exp(-657/250))', 't');
y = double(subs(soll2, 't', 8760));
figure;
hold on
syms t;
ezplot(soll, [0 8760])
ezplot(soll2, [8750 17520])
axis tight
title 'Q(t) versus t for 3 years'
xlabel Years, ylabel g
% set(gca,'Xtick',0:1:3)
% set(gca,'XtickLabel',time(0:1:end))
hold off
The graph right now displays the x axis in hours but I need it to display years. I tried the commented portion near the bottom. please help!

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!