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

4 次查看(过去 30 天)
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...
tEnersol=readtable('solar.xlsx','sheet','EneDics'); % read into a table object
tEnersol.Properties.VariableNames={'Rad','Dia'}; % assign variable names
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 个评论
Sam Chak
Sam Chak 2020-8-6
编辑:Sam Chak 2020-8-6
I think the issue has something to do with the checked 'Center and scale' option. The coefficients for the normalized x. Try unchecking it. I don't know why the Sum of Sine is selected. isn't the skew gaussian distribution a better fit?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Networks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by