undefine function : error

Hello Dears, Here i got the one error undefined function 'degree' . can anyone say the solve? how i can get solution?
function [residus, Stat, coefficients] = Calcul_Coef_NEW(SN, type, table_pression_kPa, P, T, degree)
degree = input('Enter the degree of the polynomial: ');
table_pression_psi = table_pression_kPa * 0.145038;
% Fit the polynomial curve based on the specified degree
fitting_type = ['poly', num2str(degree)];
a='poly32';
[FCT_COR,GOF,OUTPUT] = fit([T, P], table_pression_psi, fitting_type);
% Calculate the residuals
residuals = table_pression_psi - FCT_COR(T', P');
residuals2=OUTPUT.residuals;
% Calculate the maximum and average residuals
Res_max = max(abs(residuals));
Res_moy = mean(abs(residuals));
SYNTH_RES{1, 1} = 'SN Capteur';
SYNTH_RES{2, 3} = 'P';
SYNTH_RES{1, 4} = 'Résidu max';
SYNTH_RES{1, 5} = 'Résidu moy';
SYNTH_RES{1, 6} = 'R²';
SYNTH_RES{1, 7} = 'Erreur standard (psi)';
SYNTH_RES{2, 1} = SN;
SYNTH_RES{2, 4} = Res_max;
SYNTH_RES{2, 5} = Res_moy;
%SYNTH_RES{2, 6} = NaN;
%SYNTH_RES{2, 7} = NaN;
SYNTH_RES{2,6}=GOF.rsquare;
SYNTH_RES{2,7}=GOF.rmse;
% Write the coefficients
coefficients = coeffvalues(FCT_COR);
for m = 1:length(coefficients)
SYNTH_RES{m+4, 1} = ['a', num2str(m-1)];
SYNTH_RES{m+4, 2} = coefficients(m);
end
SYNTH_RES{length(coefficients)+6, 1} = 'Pression banc (psi)';
SYNTH_RES{length(coefficients)+6, 2} = 'Pression banc (kPa)';
SYNTH_RES{length(coefficients)+6, 3} = 'Température (°C)';
SYNTH_RES{length(coefficients)+6, 4} = 'Ratio';
SYNTH_RES{length(coefficients)+6, 5} = 'Residu (psi)';
SYNTH_RES{length(coefficients)+6, 6} = 'Residu (kPa)';
SYNTH_RES{length(coefficients)+6, 7} = 'Pression corrigée (psi)';
SYNTH_RES{length(coefficients)+6, 8} = 'Pression corrigée (kPa)';
% Write the data (P reference, temperature, ratio, residuals, P0) in psi & kPa
for i = 1:length(table_pression_psi)
SYNTH_RES{length(coefficients)+6+i, 1} = table_pression_psi(i);
SYNTH_RES{length(coefficients)+6+i, 2} = table_pression_kPa(i);
SYNTH_RES{length(coefficients)+6+i, 3} = T(i);
SYNTH_RES{length(coefficients)+6+i, 4} = P(i);
SYNTH_RES{length(coefficients)+6+i, 5} = OUTPUT.residuals(i);
SYNTH_RES{length(coefficients)+6+i, 6} = OUTPUT.residuals(i)*6.894757;
SYNTH_RES{length(coefficients)+6+i, 7} = FCT_COR(T(i),P(i));
SYNTH_RES{length(coefficients)+6+i, 8} = FCT_COR(T(i),P(i))*6.894757;
%SYNTH_RES{length(coefficients)+6+i, 9} = residuals_p32(i);
%SYNTH_RES{length(coefficients)+6+i, 10} = residuals_p32(i) * 6.894757;
%SYNTH_RES{length(coefficients)+6+i, 11} = FCT_COR_p32(T(i));
%SYNTH_RES{length(coefficients)+6+i, 12} = FCT_COR_p32(T(i)) * 6.894757;
end
xlswrite(fullfile('.\results\Poly', strcat('SN', SN, '_synthese.xlsx')), SYNTH_RES, type);
residus = cat(2, residuals);
Stat(1, 1) = Res_max * 6.894757;
Stat(2, 1) = Res_moy * 6.894757;
%Stat(3, 1) = NaN;
%Stat(4, 1) = NaN;
%Stat(1, 2) = Res_max_p32 * 6.894757;
%Stat(2, 2) = Res_moy_p32 * 6.894757;
%Stat(3, 2) = NaN;
%Stat(4, 2) = NaN;
Stat(3,1)= GOF.rsquare;
Stat(4,1)= GOF.rmse*6.894757;
end

13 comentarios

Swastik Sarkar
Swastik Sarkar el 1 de Jun. de 2023
Could you give the values of the function argument to reproduce the error ?
md sazzad
md sazzad el 1 de Jun. de 2023
Sorry i dont understand your Question.
Dyuman Joshi
Dyuman Joshi el 1 de Jun. de 2023
How do you run your code or call the function?
You need to provide inputs to the function to run it and get the output(s).
md sazzad
md sazzad el 1 de Jun. de 2023
I put as input program :
clear
clc
close all
Res = extract_palier_P0_P21_P32_montant_descendant_NEW('SN2124009_Calib_2022-04-07','C:\Users\FX625040\Documents\Stage\Scripts Matlab\P0\capteur2125011.txt',...
[1 594;606 618;630 642;654 666;678 690;702 714;726 738;750 762;774 786;798 809;821 833;845 1430;1442 1454;1466 1478;1490 1502;1514 1525;1537 1549;1561 1573;1585 1597;1609 1621;1633 1645;1657 1669;1681 2265;2277 2289;2301 2313;2325 2337;2349 2361;2373 2385;2397 2409;2421 2433;2445 2457;2469 2480;2492 2504;2516 3101;3113 3125;3137 3149;3161 3173;3185 3197;3209 3221;3233 3244;3256 3268;3280 3292;3304 3316;3328 3340;3352 3937;3949 3960;3972 3984;3996 4008;4020 4032;4044 4056;4068 4080;4092 4104;4116 4128;4140 4151;4163 4175;4187 4772;4784 4796;4808 4820;4832 4844;4856 4868;4880 4892;4904 4915;4927 4939;4951 4963;4975 4987;4999 5011;5023 10000],...
1);
md sazzad
md sazzad el 1 de Jun. de 2023
I have 4 more prgram which run with those program . the most needed program is below ,which is maybe needed for you to fix the errors :
function [RES] = extract_palier_P0_P21_P32_montant_descendant_NEW(SN,titre, table_delete,SW_version)
%extract_palier_P0_P21_P32_montant_descendant that takes four input arguments:
%SN, titre, table_delete, and SW_version
formatOut='yyyymmddTHHMM';
Datejour=datestr(now,formatOut);
%SN = 'Palier';
%Datejour = num2str(datetime('today'),'yyyymmdd');
SN=strcat(SN,'_',Datejour);
%saisir le SN du capteur
table_pression_kpa=[... %saisir manuellement les paliers de pression du banc, dans l'ordre ou ils ont été effectués
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120;...
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120;...
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120;...
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120;...
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120;...
100; 80; 60; 40; 20; 10;30; 50; 70; 90; 120 ];
% AJUSTER LES PALIERS DE PRESSION AVEC LA VARIATION DE PATM
% PENDANT LES PALIERS
table_pression_psi=table_pression_kpa*0.145038;
%load('Pbanc.mat')
% load('Pbanc_sans60degres.mat')
% table_pression_psi=Pbanc_abs_comp;
% supprimer manuellement les paliers/points qui ne nous interessent pas, ainsi que les transitions (la détection de stabilité ne marche pas très bien).
% Format : [début_plage_suppr1 fin_plage_suppr1 ; début_plage_suppr2 fin_plage_suppr2]
%saisir manuellement le chemin du log à analyser
%titre='C:\Users\F528245\Desktop\Matlab_Etienne\P0\Data\capteur2124001.txt';
%table_delete=[1 583;595 607;619 630;642 654;666 678;690 702;714 726;738
%750;762 774;786 798;810 822;834 1419;1431 1442;1454 1466;1478 1490;1502
%1514;1526 1538;1550 1562;1574 1586;1598 1610;1622 1634;1646 1657;1669
%2254;2266 2278;2290 2302;2314 2326;2338 2350;2362 2374;2386 2398;2410
%2422;2434 2446;2458 2469;2481 2493;2505 3090;3102 3114;3126 3138;3150 3162;3174 3186;3198 3210;3222 3234;3246 3258;3270 3282;3294 3305;3317 3328;3340 3926;3938 3950;3962 3974;3986 3998;4010 4022;4034 4046;4058 4072;4084 4094;4106 4117;4129 4141;4153 4165;4177 4761;4773 4786;4798 4810;4822 4834;4846 4858;4870 4882;4894 4905;4917 4929;4941 4953;4965 4977;4989 5001;5013 10000];
%% data extract
[data,temp]=detect_palier_P0(titre,table_delete,SN,SW_version);
%% extraction des paliers
n_palier=ones(1,length(data));
current_palier=1;
indice_palier(1,1)=1;
%origine : seuil_palier=5000/8388607; %5000 LSB comparés à 2^23=8388607 --> si deux échantillons successifs ont au moins cet écart, on est sur un nouveau palier.
%for i=2:length(data)
% if (data(i)>data(i-1)+seuil_palier) || (data(i)<data(i-1)-seuil_palier)
% current_palier=current_palier+1;
% indice_palier(current_palier-1,2)=i-1;
% indice_palier(current_palier,1)=i;
% end
% n_palier(i)=current_palier;
%end
seuil_palier_P=5000/8388607;
%Ajout de condition sut la température pour le cahngement de palier (10°C)
seuil_palier_T=10;
for i=2:length(data)
%25/20/2021 Eetienne; mise en commetaire opour corriger pb dettection palier if ((data(i)>data(i-1)+seuil_palier_P) || (data(i)<data(i-1)-seuil_palier_P))
if ((data(i)>data(i-1)+seuil_palier_P) || (data(i)<data(i-1)-seuil_palier_P) || ...
((temp(i)>temp(i-1)+seuil_palier_T) || (temp(i)<temp(i-1)-seuil_palier_T)))
current_palier=current_palier+1;
indice_palier(current_palier-1,2)=i-1;
indice_palier(current_palier,1)=i;
end
n_palier(i)=current_palier;
end
nb_palier=max(n_palier);
indice_palier(nb_palier,2)=length(data);
%% Palier moyenné sur la plage stable et calcul d'indicateurs statistiques sur la plage stable
%% Averaged level over the stable range and calculation of statistical indicators over the stable range
% This code is used to process data that contains stable ranges of values and calculate various statistical indicators for these ranges.
%The stable ranges are defined by the "indice_palier" array,
%which contains the start and end indices of each range.
%"data" array between the two indices "indice_palier(i,1)" and "indice_palier(i,2)",
%and assigns this mean value to the "i-th" row and first column of the "palier_extract" array
for i=1:nb_palier
palier_extract(i,1)=mean(data(indice_palier(i,1):indice_palier(i,2))); % pression moyenne
palier_extract(i,2)=mean(temp(indice_palier(i,1):indice_palier(i,2))); % température moyenne
palier_extract(i,3)=std(data(indice_palier(i,1):indice_palier(i,2))); % ecart type sur le ratio (en V/V):::standard deviation on the ratio convert it from volts per volt (V/V) to least significant bits (LSB),
palier_extract(i,4)=std(data(indice_palier(i,1):indice_palier(i,2)))*8388608; % ecart type sur le ratio (en LSB)least significant bit
palier_extract(i,5)=std(temp(indice_palier(i,1):indice_palier(i,2))); % ecart type sur la température (en °C):::standard deviation on the temparature
%This provides an estimate of the amount of variation or noise in the
%temperature over each stable range.
end
%% Fit
%perform a polynomial fit on the data contained in the "palier_extract" array.
%The "fit" function is called with three input arguments: [T,alpha], P, and 'polytype'
%the "fit" function is likely being used to fit a polynomial function of "T" and "alpha" to the pressure data "P".
%extracts the second column (index 2) of the "palier_extract" array and assigns it to a variable called "T".
%[FCT_COR,GOF,OUTPUT]=fit([T,alpha],P,'polytype')
%the notation (:,2) is used to select all rows in the second column of a 2D array or matrix.
T=palier_extract(:,2); % temperature
P=palier_extract(:,1); % pression
%% Definition des P & T quand T descend
for t = 12:55
T_descendant(t-11,1)=palier_extract(t,2);
P_descendant(t-11,1)=palier_extract(t,1);
table_pression_kPa_descendant(t-11,1)= table_pression_kpa(t);
end
%% Definition des P & T quand T monte
%two arrays T_montant and P_montant based on the data in palier_extract,
%as well as a third array table_pression_kPa_montant
%t = 1 to t = 22 and extracts data from the first 22 rows of palier_extract
%into the T_montant and P_montant arrays.
%The table_pression_kPa_montant array is also assigned the corresponding value from the table_pression_kpa array for each row.
for t = 1:22
T_montant(t,1)=palier_extract(t,2);
P_montant(t,1)=palier_extract(t,1);
table_pression_kPa_montant(t,1)= table_pression_kpa(t);
end
%extracts data from the 45th to 66th rows of palier_extract
%the code subtracts 22 from t and uses that value as the index in the T_montant and P_montant arrays. This effectively starts assigning values to these arrays at index 23,
%so that the data from the second for loop is appended to the data from the first for loop
for t = 45:66
T_montant(t-22,1)=palier_extract(t,2);
P_montant(t-22,1)=palier_extract(t,1);
table_pression_kPa_montant(t-22,1)= table_pression_kpa(t);
%instead of using the index t, the code subtracts 22 from t and uses that value as the index in the T_montant and P_montant arrays.
%This effectively starts assigning values to these arrays at index 23,
end
%Calcul des coeff des polynomes p21 & p32
%pressure and temperature measurements at different levels.
%[residus_montant,Stat_montant] = Calcul_Coef_NEW(SN,'montant',table_pression_kPa_montant,P_montant,T_montant);
%[residus_descendant,Stat_descendant] = Calcul_Coef_21_32(SN,'descendant',table_pression_kPa_descendant,P_descendant,T_descendant);
%calculates the coefficients for a third scenario, labeled "full", which likely refers to the entire data set
degree = 3; % Replace '3' with the desired degree value for polynomial fit
%[residus_full,Stat_full] = Calcul_Coef_NEW(SN,'full',table_pression_kpa,P,T,degree);
[residus_full, Stat_full] = Calcul_Coef_NEW(SN, 'full', table_pression_kpa, P, T, degree);
table_pression_psi = table_pression_psi.';
%[residus_full, Stat_full] = Calcul_Coef_NEW(SN, 'full', table_pression_kpa, P, T, degree);
% affichage des résidus ..psi to kPa
residus_montant_p80=residus_montant(1:11,:)*6.894757; %between 0 and 80 kPa,
% : means all columns.1:11, : selects all rows and all columns of the matrix from
residus_montant_p105=residus_montant(12:22,:)*6.894757;%the pressure range between 80 and 105 kPa
residus_montant_m40=residus_montant(23:33,:)*6.894757; %-40 and 0 degree,
residus_montant_p20=residus_montant(34:44,:)*6.894757; %pressure range between 105 and 125 kPa.
%The factor 6.894757 is used to convert the residuals from psi to kPa
%pression_montant_p80=table_pression_kpa(1:11);
%pression_montant_p80 is created by selecting the first 11 rows of table_pression_kpa.
%pression_montant_p105=table_pression_kpa(12:22);
%pression_montant_m40=table_pression_kpa(45:55);
%pression_montant_p20=table_pression_kpa(56:66);
%residus_descendant_p105=residus_descendant(1:11,:)*6.894757;
%residus_descendant_p50=residus_descendant(12:22,:)*6.894757;
%residus_descendant_m10=residus_descendant(23:33,:)*6.894757;
%residus_descendant_m40=residus_descendant(34:44,:)*6.894757;
%pression_descendant_p105=table_pression_kpa(12:22);
%pression_descendant_p50=table_pression_kpa(23:33);
%pression_descendant_m10=table_pression_kpa(34:44);
%pression_descendant_m40=table_pression_kpa(45:55);
residus_full_p80=residus_full(1:11,:)*6.894757;
residus_full_p105=residus_full(12:22,:)*6.894757;
residus_full_p50=residus_full(23:33,:)*6.894757;
residus_full_m10=residus_full(34:44,:)*6.894757;
residus_full_m40=residus_full(45:55,:)*6.894757;
residus_full_p20=residus_full(56:66,:)*6.894757;
pression_full_p80=table_pression_kpa(1:11);
pression_full_p105=table_pression_kpa(12:22);
pression_full_p50=table_pression_kpa(23:33);
pression_full_m10=table_pression_kpa(34:44);
pression_full_m40=table_pression_kpa(45:55);
pression_full_p20=table_pression_kpa(56:66);
%Res full allows for a more comprehensive understanding of the relationship between pressure,
%temperature, and the polynomial coefficients
%maximum and minimum specification limits for the residuals
residus_spec_max=[0.8;0.8;0.6;0.6;1;1;1.2;1.2];
residus_spec_min=[-0.8;-0.8;-0.6;-0.6;-1;-1;-1.2;-1.2];
p_spec=[6.9;10;10;60;100;120;120;141];
%p_spec vector contains the corresponding pressure values
%8 rows and 1 column.
%f=figure('Name',strcat(SN,'_residus_poly21_kpa_','montant'),'units','normalized','outerposition',[0 0 1 1]);
%clear ha
%ha=plot(...
% p_spec,residus_spec_max,'r',... %Two red horizontal lines at
% p_spec,residus_spec_min,'r',...
% pression_montant_p105,residus_montant_p105(:,1),'-o',... %(:,1) selects all the rows of the residus_montant_p105 matrix, and only the first column.
% pression_montant_p80,residus_montant_p80(:,1),'-o',...
% pression_montant_p20,residus_montant_p20(:,1),'-o',...
% pression_montant_m40,residus_montant_m40(:,1),'-o');
% ylabel('residu (kPa)');
% xlabel('pression (kPa)');
%legend('Res_{max}','Res_{min}','+105°C','+80°C','+20°C','-40°C');
%It is typically used to label different lines or markers in a plot.
%saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly21_kPa_','montant','.png'))
%f=figure('Name',strcat(SN,'_residus_poly32_kpa_','montant'),'units','normalized','outerposition',[0 0 1 1]);
%clear ha
%ha=plot(...
% p_spec,residus_spec_max,'r',...
% p_spec,residus_spec_min,'r',...
% pression_montant_p105,residus_montant_p105(:,2),'-o',...
% pression_montant_p80,residus_montant_p80(:,2),'-o',...
% pression_montant_p20,residus_montant_p20(:,2),'-o',...
% pression_montant_m40,residus_montant_m40(:,2),'-o');
% ylabel('residu (kPa)');
% xlabel('pression (kPa)');
%legend('Res_{max}','Res_{min}','+105°C','+80°C','+20°C','-40°C');
%saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly32_kPa_','montant','.png'))
%f=figure('Name',strcat(SN,'_residus_poly21_kpa_','descendant'),'units','normalized','outerposition',[0 0 1 1]);
%clear ha
%ha=plot(...
% p_spec,residus_spec_max,'r',...
% p_spec,residus_spec_min,'r',...
% pression_descendant_p50,residus_descendant_p50(:,1),'-o',...
% pression_descendant_m10,residus_descendant_m10(:,1),'-o',...
% pression_descendant_m40,residus_descendant_m40(:,1),'-o');
% ylabel('residu (kPa)');
% xlabel('pression (kPa)');
%legend('Res_{max}','Res_{min}','+105°C','+50°C','-10°C','-40°C');
%saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly21_kPa_','descendant','.png'))
%f=figure('Name',strcat(SN,'_residus_poly32_kpa_','descendant'),'units','normalized','outerposition',[0 0 1 1]);
%clear ha
%ha=plot(...
% p_spec,residus_spec_max,'r',...
% p_spec,residus_spec_min,'r',...
% pression_descendant_p105,residus_descendant_p105(:,2),'-o',...
% pression_descendant_p50,residus_descendant_p50(:,2),'-o',...
% pression_descendant_m10,residus_descendant_m10(:,2),'-o',...
% pression_descendant_m40,residus_descendant_m40(:,2),'-o');
% ylabel('residu (kPa)');
% xlabel('pression (kPa)');
%legend('Res_{max}','Res_{min}','+105°C','+50°C','-10°C','-40°C');
%saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly32_kPa_','descendant','.png'))
f=figure('Name',strcat(SN,'_residus_poly21_kpa_','full'),'units','normalized','outerposition',[0 0 1 1]);
clear ha
ha=plot(...
p_spec,residus_spec_max,'r',...
p_spec,residus_spec_min,'r',...
pression_full_m40,residus_full_m40(:,1),'-o',...
pression_full_m10,residus_full_m10(:,1),'-o',...
pression_full_p20,residus_full_p20(:,1),'-o',...
pression_full_p50,residus_full_p50(:,1),'-o',...
pression_full_p80,residus_full_p80(:,1),'-o',...
pression_full_p105,residus_full_p105(:,1),'-o');
ylabel('residu (kPa)');
xlabel('pression (kPa)');
legend('Res_{max}','Res_{min}','-40°C','-10°C','+20°C','+50°C','+80°C','+105°C');
saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly21_kPa_','full','.png'))
f=figure('Name',strcat(SN,'_residus_poly32_kpa_','full'),'units','normalized','outerposition',[0 0 1 1]);
clear ha
ha=plot(...
p_spec,residus_spec_max,'r',...
p_spec,residus_spec_min,'r',...
pression_full_m40,residus_full_m40(:,2),'-o',...
pression_full_m10,residus_full_m10(:,2),'-o',...
pression_full_p20,residus_full_p20(:,2),'-o',...
pression_full_p50,residus_full_p50(:,2),'-o',...
pression_full_p80,residus_full_p80(:,2),'-o',...
pression_full_p105,residus_full_p105(:,2),'-o');
ylabel('residu (kPa)');
xlabel('pression (kPa)');
legend('Res_{max}','Res_{min}','-40°C','-10°C','+20°C','+50°C','+80°C','+105°C');
saveas(f,strcat('.\results\Poly21_32\SN',SN,'_residus_poly32_kPa_','full','.png'))
SYNTH_RES{1,2}='Poly21 montant';
SYNTH_RES{1,3}='Poly32 montant';
SYNTH_RES{1,4}='Poly21 descendant';
SYNTH_RES{1,5}='Poly32 descendant';
SYNTH_RES{1,6}='Poly21 full';
SYNTH_RES{1,7}='Poly32 full';
SYNTH_RES{2,1}='Résidu max (kPa)';
SYNTH_RES{3,1}='Résidu moy (kPa)';
SYNTH_RES{4,1}='R²';
SYNTH_RES{5,1}='Erreur standard (kPa)';
stat = cat(2,Stat_montant, Stat_descendant,Stat_full);
%this part is for the montant and decendat full and polynom 21 and 32 for
%comparing the the staticstics
for i =1:4
for j =1:6
SYNTH_RES{i+1,j+1}=stat(i,j);
end
end
xlswrite(strcat('.\results\Poly21_32\SN',SN,'_synthese.xlsx'),SYNTH_RES,'Synthese');
RES =1;
Image Analyst
Image Analyst el 1 de Jun. de 2023
Did you forget to attach 'C:\Users\FX625040\Documents\Stage\Scripts Matlab\P0\capteur2125011.txt'?
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
md sazzad
md sazzad el 1 de Jun. de 2023
Here i attached all the codes . with the .txt file. i found the errors . please help me to solve. i would like to see the output graph for the any degree of polynomial : 32/22/23/43 etc...
now showing errors are :
Error using fit>iFit (line 131)
Y must be a column vector.
Error in fit (line 108)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
Error in Calcul_Coef_NEW (line 10)
FCT_COR = fit(data_matrix, table_pression_psi.', fitting_type);
Error in extract_palier_P0_P21_P32_montant_descendant_NEW (line 140)
[residus_full, Stat_full] = Calcul_Coef_NEW(SN, 'full', table_pression_kpa, P, T, degree);
Error in autom_P0_montant_descendant_NEW (line 4)
Res =
extract_palier_P0_P21_P32_montant_descendant_NEW('SN2124009_Calib_2022-04-07','C:\Users\FX625040\Documents\Stage\Scripts
Matlab\P0\capteur2125011.txt',...
Image Analyst
Image Analyst el 1 de Jun. de 2023
If it says Y must be a column vector, then replace Y in line 131 with Y(:).
Stephen23
Stephen23 el 1 de Jun. de 2023
Why did you define DEGREE as the sixth input argument, just to ignore that input argument and overwrite it with some unrelated value on the very next line?:
function [residus, Stat, coefficients] = Calcul_Coef_NEW(SN, type, table_pression_kPa, P, T, degree)
degree = input('Enter the degree of the polynomial: ');
md sazzad
md sazzad el 1 de Jun. de 2023
anybody help me please?
md sazzad
md sazzad el 1 de Jun. de 2023
i added degree , so that i can give a degree of polynomial as a input everytime. thats why. I am sorry but when i solve the column vector there coming another error.
i just want could you please resolve the error and give me back ? other wise it will time consuming and everytime i need to correct and every time it comes the new error...Thank you for your understanding.
Dyuman Joshi
Dyuman Joshi el 1 de Jun. de 2023
@Cris LaPierre, since (at that time) there was no activity on that post, and there was on this thread, I flagged that particular question.

Iniciar sesión para comentar.

Respuestas (1)

Mathieu NOE
Mathieu NOE el 1 de Jun. de 2023

0 votos

hello
I corrected all the bugs I could find - find my suggestions in the attached zip file
now the last point I cannot fully test is the fitting itself as I don't have the CF toolbox, but the "degree" issue is solved
all the best

Preguntada:

el 1 de Jun. de 2023

Respondida:

el 1 de Jun. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by