# how i can export the curve fitting to my actual curve?

7 views (last 30 days)
Ana Soph on 5 Aug 2020
Commented: Ana Soph on 6 Aug 2020
Hi guys, thank you so much for reading me, i am using matlab 2019a, the problem that i have, is i want to graph the curve that is provided for the curve fitting tool to my current curve. So.. what can i do? i was trying to plot the function that is given for the curve fitting tool but it doesn't work.
this is my code right now, ,and also i show you the curve fitting that i want, again thank you so much
pd: the data that i have is in datetime...
yr=2014; % need the proper year
tEnersol.Date=datetime(yr,1,tEnersol.Dia); % and create a date column
hB=plot(tEnersol.Date,tEnersol.Rad, '.r'); hold on % plot against actual date
xtick(0:50:350);
hAx=gca; % get axes handle...
xlim([datetime(2014,1,1) datetime(2014,12,12)]) % set limit to cover the full year
hAx.XAxis.TickLabelFormat='MM'; % show day of MONTH
% xticklabels(cellstr(tEnersol.Date(xticks))) % use the date string as tick labels
hAx.XTickLabelRotation=45; % rotate so can have chance to read...
xlabel('Mes del año, TMYE'), ylabel('Irradiancia solar máxima [KWh/m^2]');
% a1= 2329
% b1= 0.6522
% c1= 0.95
% a2= 1519
% b2= 0.7781
% c2= -2.545
% d =(1:50:365);
% w = a1.*sin(b1.*d+c1) + a2.*sin(b2.*d+c2)
% D = datetime(yr, 1, d);
% plot(D, w, '.-b') ##### 2 CommentsShow 1 older commentHide 1 older comment
Ana Soph on 6 Aug 2020
thank you, you are right!