Borrar filtros
Borrar filtros

curve fitting of a complex equation

3 visualizaciones (últimos 30 días)
Supreeth D K
Supreeth D K el 27 de Jul. de 2023
Comentada: Alex Sha el 29 de Jul. de 2023
omega=[0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10000 10500 11000 11500 12000 12500 13000 13500 14000 14500 15000];
ydata1=[0 2.773974956 9.859008802 19.20487131 29.60850853 40.54661158 51.7216818 62.90316231 73.8967491 84.55521774 94.77825113 104.5075664 113.7172145 122.4051971 130.5842098 138.2785508 145.5166646 152.3241086 158.7410015 164.7940864 170.5138742 175.9234703 181.0507873 185.9164421 190.5396332 194.9419395 199.1392141 203.1447385 206.9756021 210.6403678 214.1499578];
ydata2=[0 23.23166979 43.89101766 61.37336819 76.13374067 88.63427978 99.17236163 107.96827 115.2289659 121.1585778 125.9542122 129.7976768 132.8504967 135.2544369 137.1234954 138.5545735 139.6310041 140.4137722 140.960863 141.3115956 141.5020398 141.5603911 141.5098635 141.3688178 141.150192 140.8714973 140.5392011 140.1625248 139.7464364 139.3025573 138.8344027];
I want to curve fit the above equation to this data
ydata1 is for real part, and ydata2 is for imaginary part, my doubt is whether i should separate real and imaginary part, and solve it separately. Or should i try to solve it together, i have tried both the ways and i am not getting the proper answer.
ANSWER FOR K1 IS 204419 AND K2 IS 160380, C1 =102.884 AND C2=326.123
any hints in this regard would be appreciated
  8 comentarios
Supreeth D K
Supreeth D K el 28 de Jul. de 2023
is it possible to share the code?? so that i can once go through it.
Alex Sha
Alex Sha el 29 de Jul. de 2023
Hi, @Supreeth D K, the result provided above was obtaind by using a package other than Matlab, the code likes below, very simple. It is easy to make a judgement of goodness by taking the results back to Matlab.
ConstStr w1=k1/c1, w2=k2/c2;
ComplexStr = j;
Parameter k(2),c(2);
Variable omega,y[realPart],y[imagPart];
Function y=(k1/(1+(w1/omega)^2))+(k2/(1+(w2/omega)^2))*q-j*((c1*omega/(1+(omega/w1)^2)+(c2*omega/(1+(omega/w2)^2))))*q;
Data;
omega=[0,500,1000,1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000,9500,10000,10500,11000,11500,12000,12500,13000,13500,14000,14500,15000];
y_real=[0,2.773974956,9.859008802,19.20487131,29.60850853,40.54661158,51.7216818,62.90316231,73.8967491,84.55521774,94.77825113,104.5075664,113.7172145,122.4051971,130.5842098,138.2785508,145.5166646,152.3241086,158.7410015,164.7940864,170.5138742,175.9234703,181.0507873,185.9164421,190.5396332,194.9419395,199.1392141,203.1447385,206.9756021,210.6403678,214.1499578];
y_image=[0,23.23166979,43.89101766,61.37336819,76.13374067,88.63427978,99.17236163,107.96827,115.2289659,121.1585778,125.9542122,129.7976768,132.8504967,135.2544369,137.1234954,138.5545735,139.6310041,140.4137722,140.960863,141.3115956,141.5020398,141.5603911,141.5098635,141.3688178,141.150192,140.8714973,140.5392011,140.1625248,139.7464364,139.3025573,138.8344027];

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by