Effacer les filtres
Effacer les filtres

Comparing values of 2 matrices and finding where they are equal corresponding to values of another matrix, beta

1 vue (au cours des 30 derniers jours)
I want to compare the values of cp_found, a matrix, with the values of CpM, another matrix, and find for which value(s) of beta, a matrix, the two are the same. This is what I have so far, but am unable to find the value of beta that makes the 2 matrices equal. Any help is appreciated.
%%Values of lambda (for lamba different of optmiun or Cp no optimun or Wind Speed:11,7 m/s up to 15 m/s and down to 11,7 m/s
%Define Values of Lambda(That we found , this value are in the table excel)
lambda_found = [7.943485689; 7.876168014; 7.809981728; 7.744898547; 7.680891121;
...
7.876168014; 7.943485689];
cp_found = [0.3862077656; 0.3764718995; 0.3670605433; 0.3579602882; 0.3491583852;
...
0.3764718995; 0.3862077656];
%%Calculus for find
while k<17
beta2(k,1)=j;
Cp0=(-4.1909e-1) + (2.1808e-1).*lambda + (-1.2406e-2).*lambda.^(2) + (-1.3365e-4).*lambda.^(3)+(1.1524e-5).*lambda.^(4);
Cp1=(-6.7606e-2).*beta2(j,1) + (6.0405e-2).*beta2(j,1).*lambda + (-1.3934e-2).*beta2(j,1).*lambda.^(2) + (1.0683e-3).*beta2(j,1).*lambda.^(3) + (-2.3895e-5).*beta2(j,1).*lambda.^(4)
Cp2=(1.5727e-2).*beta2(j,1).^(2) + (-1.0996e-2).*beta2(j,1).^(2).*lambda + (2.1495e-3).*beta2(j,1).^(2).*lambda.^(2) + (-1.4855e-4).*beta2(j,1).^(2).*lambda.^(3) + (2.7937e-6).*beta2(j,1).^(2).*lambda.^(4);
Cp3=(-8.6018e-4)*beta2(j,1).^(3) + (5.7051e-4).*beta2(j,1).^(3).*lambda + (-1.0479e-4).*beta2(j,1).^(3).*lambda.^(2) +(5.9925e-6).*beta2(j,1).^(3).*lambda.^(3) + (-8.9194e-8).*beta2(j,1).^(3).*lambda.^(4);
Cp4= (1.4787e-5)*beta2(j,1).^(4) + (-9.4839e-6).*beta2(j,1).^(4).*lambda + (1.6167e-6).*beta2(j,1).^(4).*lambda.^(2) +(-7.1535e-8).*beta2(j,1).^(4).*lambda.^(3) + (4.9686e-10).*beta2(j,1).^(4).*lambda.^(4);
CpM = Cp0 + Cp1 + Cp2 + Cp3 + Cp4;
end

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by