polyfits for continuous smile section with actual data

3 views (last 30 days)
first question.
I got the data from the actual measurement, and I'm going to polyfit it with the data.
But I can do polyfits for the whole section, but I want to do polyfits multiple times in three minutes.
Second question.
The reason I used log (5080 - 430) is because I want to apply it as real data.
However, during P= polyfit (x, Y, 1), the b and m values were selected.
But I just want to do a regression analysis of the m values. How should I change the expression?
Can you help me?
% % 1번 위치
file_name = '20200207_1.xlsx'
x= linspace( 1/60, 349/60 , 349);
y = xlsread(file_name, 'sheet1','C6:C354' );
y_t=y';
figure(1);
plot(x,y_t,'ro','Linewidth',1,'Markersize',1);
grid; hold on; axis([0 7 0 6000]);
Y = log( y_t - 430);
P= polyfit(x, Y, 1);
b = log(5080 - 430)
m = P(1)
X1=linspace(1/60,349/60,2000);
Y1=(exp(m*X1+b))+430;
plot(X1,Y1,'b-', 'linewidth', 1);
xlabel ('t [h]')
ylabel ('indoor CO2 concentration [ppm]')
title('20200207 1location')
legend ('real time data','ach = 0.7273')
hold off;
  6 Comments
darova
darova on 26 Feb 2020
The question remains unclear for
You want to get coeffiecients for each region of a curve?
jungmin park
jungmin park on 27 Feb 2020
Edited: jungmin park on 27 Feb 2020
That's right. I want to get for each area.
For example, if the time interval is set to be 1 hour, the time zone is A4 : A63, A64 : A123, A124 : A183, A184 : A243, A244 : A303 ... The Cini value is set at 5122 ppm, C64 (2588 ppm), C124 (1436 ppm), C184 (909 ppm), and C244 (658 ppm).
In addition, I want to see the code of the graph that was first floating to me.

Sign in to comment.

Answers (0)

Categories

Find more on Geographic Plots in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!