How to overcome this error while using lsqnonlin for curvefitting??
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Solver stopped prematurely.
fmincon stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 3.000000e+03.
Please help me to change maxfunctionevaluations to 10000.
2 comentarios
  Mann Baidi
      
 el 17 de En. de 2024
				
      Editada: Mann Baidi
      
 el 17 de En. de 2024
  
			Hi,
Can you share the code where you are using the function "lsqnonlin".
  Anil Kumar Mekala
 el 17 de En. de 2024
				
      Editada: Torsten
      
      
 el 17 de En. de 2024
  
			
		Respuestas (3)
  Hassaan
      
 el 17 de En. de 2024
        you can set various options including the maximum number of function evaluations using the optimoptions function. If you're reaching the function evaluation limit, you can increase it as follows:
% Create an options structure for fmincon where you set the MaxFunctionEvaluations to 10000
options = optimoptions('fmincon', 'MaxFunctionEvaluations', 10000);
% Then you pass these options to the fmincon function
% For example, if you were minimizing a function 'myFunction' starting at an initial point 'x0'
[x, fval, exitflag, output] = fmincon(@myFunction, x0, [], [], [], [], [], [], [], options);
In this code, replace @myFunction with the handle to your actual objective function and x0 with your actual initial point for the optimization. The rest of the parameters [] should be replaced with any constraints you have.
Make sure to include this options structure when you call fmincon. The solver will then use the specified limit for function evaluations.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Feel free to contact me.
  Mann Baidi
      
 el 17 de En. de 2024
        Hi Anil,
As per my understanding of the question, you would like to change the "options.MaxFunctionEvaluations" from 3000 to 10000. 
You can accomplish this using the below code:
% Assuming you have an existing options structure
options = optimoptions('fmincon')
% Set the 'MaxFunctionEvaluations' option to 10000
options.MaxFunctionEvaluations = 10000;
options
Hope this works!
0 comentarios
  Torsten
      
      
 el 17 de En. de 2024
        
      Editada: Torsten
      
      
 el 17 de En. de 2024
  
      clc
clear all
close all
warning off
%25wt.%
freq = [3.21760012464137	3.47500813461269	3.73241614458399	4.05417615704813	4.37593616951227	4.72987218322282	5.11598419817979	5.50209621313675	5.95256023058654	6.43520024928275	6.95001626922537	7.49700829041440	8.07617631284985	8.75187233902454	9.39539236395281	10.1676163938667	11.0041924262735	11.8407684586803	12.7738724948263	13.8678565372043	14.8974885770896	16.0880006232069	17.4072166743098	18.8229607291520	20.3674087889799	21.8796808475613	23.6493609161141	25.5477449896525	27.5426570669302	29.7949771541791	32.1760012464137	4.45924109299328	4.81598038043274	5.17271966787221	5.61864377717153	6.06456788647086	6.55508440670012	7.09019333785932	7.62530226901851	8.24959602203757	8.91848218598656	9.63196076086549	10.3900317466743	11.1926951434131	12.1291357729417	13.0209839915404	14.0912018538588	15.2506045380370	16.4100072222153	17.7031871391833	19.2193291108010	20.6462862605589	22.2962054649664	24.1244943130937	26.0865603940107	28.2269961186475	30.3228394323543	32.7754220335006	35.4063742783666	38.1711037560225	41.2925725211178	44.5924109299328	6.35302312594096	6.86126497601624	7.36950682609151	8.00480913868561	8.64011145127970	9.33894399513321	10.1013067702461	10.8636695453590	11.7530927829908	12.7060462518819	13.7225299520325	14.8025438834424	15.9460880461118	17.2802229025594	18.5508275277476	20.0755530779734	21.7273390907181	23.3791251034627	25.2215018099856	27.3815296728055	29.4144970731066	31.7651156297048	34.3698551113406	37.1651852867546	40.2146363872063	43.2005572563985	46.6947199756660	50.4430036199712	54.3818779580546	58.8289941462133	63.5302312594096	9.33854849802655	10.0856323778687	10.8327162577108	11.7665711075135	12.7004259573161	13.7276662920990	14.8482921118622	15.9689179316254	17.2763147213491	18.6770969960531	20.1712647557374	21.7588180004019	23.4397567300466	25.4008519146322	27.2685616142375	29.5098132537639	31.9378358632508	34.3658584727377	37.0740375371654	40.2491440264944	43.2374795458629	46.6927424901328	50.5215473743237	54.6305087134553	59.1130119925081	63.5021297865806	68.6383314604952	74.1480750743309	79.9379751431073	86.4749590917259	93.3854849802655	14.2246087642848	15.3625774654276	16.5005461665704	17.9230070429989	19.3454679194273	20.9101748834987	22.6171279352128	24.3240809869270	26.3155262139269	28.4492175285696	30.7251549308552	33.1433384207836	35.7037679983549	38.6909358388547	41.5358575917116	44.9497636951400	48.6481619738540	52.3465602525681	56.4716967942107	61.3080637740675	65.8599385786386	71.1230438214241	76.9551334147808	83.2139612710661	90.0417734779228	96.7273395971367	104.550874417493	112.943393588421	121.762651022278	131.719877157277	142.246087642848	22.5689147806216	24.3744279630713	26.1799411455210	28.4368326235832	30.6937241016453	33.1763047275137	35.8845745011883	38.5928442748629	41.7524923441499	45.1378295612431	48.7488559261426	52.5855714388482	56.6479760993601	61.3874482032906	65.9012311594149	71.3177707067641	77.1856885497257	83.0536063926873	89.5985916790675	97.2720227044789	104.494075434278	112.844573903108	122.097828963163	132.028151466636	142.861230561334	153.468620508227	165.881523637568	179.197183358135	193.189910522121	208.988150868556	225.689147806216	37.5314651371578	40.5339823481304	43.5364995591030	47.2896460728188	51.0427925865346	55.1712537516219	59.6750295680809	64.1788053845398	69.4332105037419	75.0629302743155	81.0679646962608	87.4483137695776	94.2039774942659	102.085585173069	109.591878200501	118.599429833419	128.357610769080	138.115791704741	148.999916594516	161.760614741150	173.770683585040	187.657325685789	203.045226392024	219.559071052373	237.574174318209	255.213962932673	275.856268758110	297.999833189033	321.269341574071	347.541367170081	375.314651371578	65.9144223994882	71.1875761914472	76.4607299834063	83.0521722233551	89.6436144633039	96.8942009272476	104.803931615186	112.713662303125	121.941681439053	131.828844798976	142.375152382894	153.580604190807	165.445200222715	179.287228926608	192.470113406506	208.289574782383	225.427324606249	242.565074430116	261.680256925968	284.091160541794	305.183775709630	329.572111997441	356.597025181231	385.599371037006	417.238293788760	448.218072316519	484.471004636238	523.360513851936	564.227455739619	610.367551419261	659.144223994882	123.394584773911	133.266151555824	143.137718337737	155.477176815128	167.816635292519	181.390039617649	196.197389790519	211.004739963388	228.279981831736	246.789169547823	266.532303111648	287.509382523213	309.720407782517	335.633270585039	360.312187539821	389.926887885560	422.009479926776	454.092071967993	489.876501552428	531.830660375557	571.316927503209	616.972923869556	667.564703626860	721.858320927381	781.087721618858	839.083176462596	906.950198088247	979.753003104856	1056.25764566468	1142.63385500642	1233.94584773911	249.081801127179	269.008345217354	288.934889307528	313.843069420246	338.751249532964	366.150247656954	396.040063792215	425.929879927477	460.801332085282	498.163602254359	538.016690434708	580.360596626328	625.195320829220	677.502499065928	727.318859291364	787.098491561887	851.859759854953	916.621028148020	988.854750474903	1073.54256285814	1153.24873921884	1245.40900563590	1347.53254409804	1457.12853659400	1576.68780113505	1693.75624766482	1830.75123828477	1977.70950094981	2132.14021764866	2306.49747843768	2490.81801127179	550.042592950819	594.046000386884	638.049407822950	693.053667118032	748.057926413113	808.562611637703	874.567722791802	940.572833945900	1017.57879695901	1100.08518590164	1188.09200077377	1281.59924157541	1380.60690830655	1496.11585282623	1606.12437141639	1738.13459372459	1881.14566789180	2024.15674205901	2183.66909401475	2370.68357561803	2546.69720536229	2750.21296475409	2975.73042786393	3217.74916876229	3481.76961337868	3740.28963206557	4042.81305818852	4367.33818802950	4708.36459565901	5093.39441072458	5500.42592950819	1353.48236219729	1461.76095117307	1570.03954014885	1705.38777636858	1840.73601258831	1989.61907243001	2152.03695589369	2314.45483935736	2503.94237006498	2706.96472439458	2923.52190234614	3153.61390391968	3397.24072911519	3681.47202517662	3952.16849761608	4277.00426454343	4628.90967871472	4980.81509288602	5373.32497792324	5833.50898107031	6266.62333697344	6767.41181098644	7322.33957948733	7917.87181885414	8567.54335270884	9203.68006294156	9948.09536215006	10746.6499558465	11585.8090204088	12533.2466739469	13534.8236219729	123.394584773911	133.266151555824	143.137718337737	155.477176815128	167.816635292519	181.390039617649	196.197389790519	211.004739963388	228.279981831736	246.789169547823	266.532303111648	287.509382523213	309.720407782517	335.633270585039	360.312187539821	389.926887885560	422.009479926776	454.092071967993	489.876501552428	531.830660375557	571.316927503209	616.972923869556	667.564703626860	721.858320927381	781.087721618858	839.083176462596	906.950198088247	979.753003104856	1056.25764566468	1142.63385500642	1233.94584773911	3800.56803289449	4104.61347552605	4408.65891815761	4788.71572144706	5168.77252473650	5586.83500835490	6042.90317230223	6498.97133624957	7031.05086085480	7601.13606578898	8209.22695105209	8855.32351664416	9539.42576256516	10337.5450494730	11097.6586560519	12009.7949839466	12997.9426724991	13986.0903610517	15088.2550905911	16380.4482217752	17596.6299923015	19002.8401644724	20561.0730579592	22233.3229924328	24057.5956482221	25843.8626236825	27934.1750417745	30176.5101811823	32532.8623615768	35193.2599846030	38005.6803289449	12565.8867575757	13571.1576981818	14576.4286387879	15833.0173145454	17089.6059903030	18471.8535336363	19979.7599445454	21487.6663554545	23246.8905015151	25131.7735151515	27142.3153963636	29278.5161451515	31540.3757615151	34179.2119806060	36692.3893321212	39708.2021539394	42975.3327109090	46242.4632678787	49886.5704275757	54158.9719251515	58180.0556875757	62829.4337878787	67981.4473584848	73510.4375318181	79542.0631754545	85448.0299515150	92359.2676681817	99773.1408551514	107563.990644848	116360.111375151	125658.867575757	51023.7348008899	55105.6335849611	59187.5323690323	64289.9058491213	69392.2793292102	75004.8901573081	81127.7383334149	87250.5865095216	94393.9093816464	102047.469601780	110211.267169922	118885.302086074	128069.574350234	138784.558658420	148989.305618598	161235.001970812	174501.173019043	187767.344067275	202564.227159533	219912.296991836	236239.892128120	255118.674004450	276038.405272814	298488.848585206	322980.241289633	346961.396646051	375024.450786541	405128.454319065	436763.169895617	472479.784256240	510237.348008899	269616.158103582	291185.450751868	312754.743400154	339716.359210512	366677.975020871	396335.752412265	428689.691384695	461043.630357125	498789.892491626	539232.316207163	582370.901503736	628205.648381345	676736.556839990	733355.950041742	787279.181662458	851987.059607317	922087.260714250	992187.461821179	1070376.14767122	1162045.64142644	1248322.81201958	1348080.79051791	1458623.41534038	1577254.52490595	1706670.28079567	1833389.87510436	1981678.76206133	2140752.29534244	2307914.31336666	2496645.62403917	2696161.58103582	2012399.14819903	2173391.08005495	2334383.01191087	2535622.92673077	2736862.84155068	2958226.74785257	3199714.64563645	3441202.54342034	3722938.42416820	4024798.29639805	4346782.16010989	4688890.01530373	5051121.86197956	5473725.68310135	5876205.51274116	6359181.30830891	6882405.08684067	7405628.86537242	7989224.61835013	8673440.32873780	9317408.05616149	10061995.7409951	10887079.3917567	11772535.0169643	12738486.6080998	13684314.2077534	14791133.7392628	15978449.2367003	17226136.7085837	18634816.1123230	20123991.4819903	23919842.0757407	25833429.4417999	27747016.8078592	30139001.0154332	32530985.2230074	35162167.8513389	38032548.9004277	40902929.9495166	44251707.8401203	47839684.1514814	51666858.8835999	55733232.0364758	60038803.6101092	65061970.4460148	69845938.8611628	75586700.9593405	81805859.8990332	88025018.8387257	94961773.0406906	103094519.346442	110748868.810679	119599210.378703	129406345.629757	139931076.143083	151412600.339439	162654926.115037	175810839.256694	189923546.081381	204753848.168340	221497737.621359	239198420.757407];
sm = [4.76080000000000	4.76180000000000	4.77610000000000	4.79020000000000	4.81000000000000	4.81840000000000	4.85980000000000	4.87800000000000	4.88150000000000	4.92060000000000	4.93230000000000	4.95920000000000	4.98300000000000	4.99180000000000	5.02290000000000	5.04860000000000	5.07320000000000	5.08520000000000	5.11960000000000	5.12270000000000	5.13450000000000	5.15800000000000	5.21170000000000	5.18910000000000	5.26050000000000	5.26070000000000	5.29810000000000	5.26780000000000	5.22320000000000	5.47320000000000	5.45670000000000	4.85670000000000	4.93000000000000	4.89880000000000	4.94220000000000	4.90170000000000	4.94790000000000	4.96530000000000	4.98470000000000	5.03120000000000	5.02240000000000	5.04370000000000	5.06350000000000	5.08080000000000	5.17150000000000	5.10970000000000	5.14550000000000	5.17300000000000	5.19430000000000	5.20160000000000	5.20650000000000	5.20610000000000	5.25470000000000	5.33240000000000	5.26760000000000	5.36810000000000	5.35940000000000	5.38380000000000	5.36460000000000	5.32370000000000	5.57440000000000	5.55170000000000	4.94110000000000	4.95080000000000	4.96770000000000	4.99360000000000	5.00870000000000	5.03740000000000	5.03490000000000	5.04970000000000	5.08550000000000	5.10570000000000	5.12470000000000	5.14190000000000	5.15870000000000	5.18060000000000	5.20300000000000	5.21980000000000	5.24120000000000	5.25510000000000	5.28370000000000	5.30650000000000	5.32310000000000	5.34740000000000	5.36500000000000	5.41470000000000	5.41800000000000	5.42990000000000	5.46690000000000	5.45270000000000	5.39140000000000	5.63320000000000	5.62670000000000	4.95260000000000	4.96640000000000	5.02700000000000	5.03710000000000	5.07120000000000	5.09550000000000	5.11290000000000	5.13530000000000	5.14440000000000	5.16500000000000	5.18990000000000	5.20160000000000	5.22710000000000	5.24250000000000	5.27000000000000	5.29190000000000	5.30680000000000	5.33080000000000	5.34910000000000	5.37250000000000	5.39410000000000	5.41720000000000	5.43190000000000	5.46470000000000	5.42780000000000	5.46740000000000	5.53850000000000	5.53450000000000	5.49680000000000	5.67540000000000	5.70120000000000	5.05320000000000	5.08900000000000	5.11580000000000	5.12280000000000	5.13670000000000	5.16310000000000	5.18870000000000	5.19700000000000	5.22110000000000	5.23890000000000	5.25720000000000	5.27710000000000	5.29250000000000	5.32310000000000	5.33470000000000	5.36350000000000	5.37610000000000	5.40160000000000	5.42020000000000	5.44780000000000	5.47090000000000	5.49140000000000	5.51220000000000	5.52900000000000	5.58430000000000	5.57570000000000	5.59210000000000	5.60570000000000	5.57680000000000	5.78210000000000	5.78090000000000	5.13650000000000	5.12250000000000	5.18280000000000	5.19140000000000	5.21010000000000	5.22590000000000	5.24490000000000	5.26340000000000	5.29560000000000	5.30510000000000	5.34990000000000	5.34540000000000	5.35110000000000	5.38410000000000	5.40930000000000	5.43700000000000	5.46200000000000	5.47430000000000	5.50290000000000	5.52690000000000	5.54990000000000	5.57680000000000	5.59760000000000	5.61000000000000	5.67040000000000	5.66870000000000	5.70300000000000	5.69740000000000	5.64810000000000	5.88820000000000	5.89390000000000	5.15910000000000	5.19060000000000	5.14400000000000	5.26530000000000	5.28770000000000	5.30660000000000	5.33710000000000	5.36260000000000	5.38320000000000	5.39850000000000	5.43050000000000	5.44120000000000	5.48790000000000	5.49620000000000	5.52600000000000	5.53160000000000	5.56000000000000	5.60380000000000	5.60150000000000	5.69090000000000	5.69090000000000	5.67820000000000	5.72710000000000	5.72050000000000	5.85030000000000	5.78680000000000	5.83370000000000	5.83110000000000	5.82910000000000	6.04870000000000	6.03040000000000	5.33140000000000	5.37120000000000	5.34180000000000	5.36280000000000	5.38810000000000	5.41550000000000	5.44280000000000	5.46570000000000	5.50860000000000	5.50600000000000	5.59050000000000	5.54800000000000	5.57380000000000	5.63770000000000	5.65980000000000	5.67510000000000	5.70400000000000	5.72990000000000	5.75440000000000	5.80030000000000	5.83290000000000	5.84430000000000	5.84820000000000	5.89750000000000	5.96530000000000	5.97850000000000	6.00610000000000	6.02750000000000	5.97970000000000	6.24390000000000	6.22380000000000	5.44150000000000	5.46450000000000	5.47850000000000	5.53300000000000	5.54270000000000	5.56360000000000	5.58240000000000	5.62050000000000	5.61040000000000	5.68660000000000	5.69600000000000	5.72800000000000	5.76520000000000	5.78970000000000	5.81950000000000	5.84900000000000	5.87950000000000	5.91640000000000	5.94780000000000	5.98260000000000	6.01170000000000	6.05120000000000	6.07790000000000	6.10460000000000	6.17440000000000	6.18740000000000	6.23250000000000	6.24280000000000	6.22150000000000	6.44010000000000	6.46550000000000	5.63610000000000	5.68220000000000	5.67540000000000	5.70300000000000	5.72910000000000	5.75950000000000	5.78460000000000	5.81860000000000	5.86450000000000	5.87690000000000	5.91600000000000	5.95470000000000	5.98560000000000	6.02020000000000	6.05000000000000	6.09000000000000	6.13050000000000	6.16220000000000	6.20610000000000	6.24710000000000	6.28280000000000	6.32460000000000	6.36220000000000	6.39870000000000	6.47810000000000	6.48860000000000	6.53930000000000	6.55920000000000	6.54900000000000	6.80540000000000	6.80340000000000	5.86210000000000	5.90190000000000	5.91720000000000	5.95420000000000	5.99930000000000	6.02850000000000	6.06110000000000	6.07670000000000	6.14030000000000	6.19750000000000	6.21150000000000	6.25930000000000	6.30450000000000	6.36710000000000	6.38830000000000	6.43930000000000	6.48330000000000	6.54650000000000	6.56450000000000	6.62300000000000	6.67190000000000	6.71800000000000	6.77940000000000	6.84610000000000	6.88330000000000	6.93820000000000	7.01690000000000	7.01690000000000	7.03750000000000	7.30840000000000	7.30420000000000	6.18010000000000	6.23320000000000	6.24220000000000	6.32500000000000	6.35510000000000	6.40700000000000	6.45330000000000	6.49460000000000	6.54680000000000	6.60950000000000	6.65410000000000	6.71110000000000	6.76850000000000	6.82570000000000	6.88310000000000	6.94120000000000	7.00150000000000	7.06240000000000	7.12160000000000	7.19410000000000	7.25460000000000	7.32330000000000	7.38690000000000	7.45840000000000	7.57220000000000	7.61030000000000	7.69560000000000	7.74250000000000	7.75880000000000	8.08220000000000	8.10590000000000	5.44150000000000	5.46450000000000	5.47850000000000	5.53300000000000	5.54270000000000	5.56360000000000	5.58240000000000	5.62050000000000	5.61040000000000	5.68660000000000	5.69600000000000	5.72800000000000	5.76520000000000	5.78970000000000	5.81950000000000	5.84900000000000	5.87950000000000	5.91640000000000	5.94780000000000	5.98260000000000	6.01170000000000	6.05120000000000	6.07790000000000	6.10460000000000	6.17440000000000	6.18740000000000	6.23250000000000	6.24280000000000	6.22150000000000	6.44010000000000	6.46550000000000	6.68490000000000	6.86090000000000	6.90820000000000	6.95350000000000	7.02880000000000	7.08520000000000	7.14510000000000	7.23200000000000	7.28870000000000	7.35970000000000	7.43410000000000	7.50200000000000	7.57890000000000	7.65890000000000	7.74480000000000	7.83140000000000	7.91990000000000	7.95590000000000	8.10610000000000	8.26570000000000	8.40350000000000	8.41890000000000	8.53100000000000	8.54670000000000	8.74870000000000	8.84590000000000	8.93290000000000	9.11930000000000	9.15920000000000	9.46520000000000	9.62020000000000	7.87780000000000	7.94770000000000	8.07820000000000	8.15890000000000	8.25370000000000	8.35160000000000	8.44440000000000	8.62000000000000	8.65020000000000	8.77370000000000	8.87410000000000	9.00080000000000	9.12120000000000	9.26810000000000	9.36680000000000	9.51220000000000	9.64800000000000	9.78880000000000	9.93200000000000	10.0950000000000	10.2380000000000	10.4040000000000	10.5630000000000	10.7380000000000	10.9600000000000	11.1070000000000	11.3020000000000	11.4740000000000	11.6070000000000	12.0590000000000	12.2150000000000	9.69180000000000	9.90900000000000	10.0760000000000	10.2750000000000	10.4310000000000	10.6170000000000	10.7990000000000	10.8920000000000	11.1960000000000	11.4010000000000	11.5460000000000	11.7240000000000	11.9290000000000	12.1350000000000	12.3360000000000	12.5490000000000	12.7610000000000	12.9620000000000	13.1800000000000	13.4340000000000	13.6620000000000	13.9110000000000	14.1560000000000	14.4170000000000	14.7450000000000	14.9570000000000	15.2920000000000	15.5490000000000	15.7740000000000	16.3410000000000	16.6320000000000	14.1640000000000	14.5800000000000	14.9280000000000	15.3060000000000	15.6760000000000	16.0880000000000	16.4860000000000	16.9030000000000	17.3400000000000	17.8160000000000	18.2700000000000	18.7630000000000	19.2690000000000	19.8130000000000	20.3260000000000	20.9240000000000	21.5390000000000	22.1160000000000	22.7690000000000	23.5020000000000	24.1220000000000	24.8870000000000	25.6880000000000	26.5520000000000	27.4430000000000	28.2340000000000	29.2050000000000	30.1410000000000	31.1020000000000	32.4650000000000	33.4860000000000	26.9600000000000	28.2000000000000	29.3730000000000	30.5320000000000	31.7440000000000	33.0550000000000	34.3660000000000	35.7030000000000	37.1920000000000	38.7390000000000	40.2420000000000	41.8370000000000	43.5460000000000	45.3800000000000	47.1970000000000	49.2550000000000	51.4040000000000	53.4200000000000	55.6190000000000	58.0350000000000	60.2820000000000	62.8000000000000	65.6060000000000	68.4480000000000	71.4320000000000	74.1490000000000	77.2680000000000	80.4140000000000	83.5370000000000	87.5070000000000	91.0650000000000	97.0490000000000	102.680000000000	107.410000000000	112.650000000000	117.570000000000	121.980000000000	126.660000000000	131.190000000000	136.080000000000	141.010000000000	145.710000000000	150.480000000000	155.250000000000	160.330000000000	165.170000000000	170.140000000000	175.340000000000	180.220000000000	185.700000000000	191.620000000000	196.950000000000	202.800000000000	208.720000000000	215.210000000000	222.040000000000	227.820000000000	234.210000000000	240.810000000000	247.090000000000	255.100000000000	262.110000000000];
lm = [0.387150000000000	0.394830000000000	0.361370000000000	0.404480000000000	0.413010000000000	0.399960000000000	0.439830000000000	0.400790000000000	0.396220000000000	0.398520000000000	0.407260000000000	0.409520000000000	0.415120000000000	0.403990000000000	0.407170000000000	0.398670000000000	0.409350000000000	0.387750000000000	0.394220000000000	0.401520000000000	0.397380000000000	0.391980000000000	0.392040000000000	0.432290000000000	0.422670000000000	0.401980000000000	0.406530000000000	0.396390000000000	0.450110000000000	0.605640000000000	0.350200000000000	0.376800000000000	0.376210000000000	0.381650000000000	0.366470000000000	0.467760000000000	0.385700000000000	0.394060000000000	0.390970000000000	0.400310000000000	0.393360000000000	0.393250000000000	0.400840000000000	0.389100000000000	0.397720000000000	0.403690000000000	0.387320000000000	0.413990000000000	0.401610000000000	0.396320000000000	0.390670000000000	0.379830000000000	0.398240000000000	0.386370000000000	0.389950000000000	0.417370000000000	0.375040000000000	0.374320000000000	0.363220000000000	0.488000000000000	0.592580000000000	0.374440000000000	0.376590000000000	0.373760000000000	0.376620000000000	0.379200000000000	0.385520000000000	0.424660000000000	0.391960000000000	0.369290000000000	0.385100000000000	0.392360000000000	0.385410000000000	0.383830000000000	0.389990000000000	0.395570000000000	0.395540000000000	0.406560000000000	0.397350000000000	0.395280000000000	0.396080000000000	0.399510000000000	0.396360000000000	0.392130000000000	0.395730000000000	0.410070000000000	0.428470000000000	0.403190000000000	0.407250000000000	0.393930000000000	0.450880000000000	0.605950000000000	0.372050000000000	0.359490000000000	0.383820000000000	0.382690000000000	0.415340000000000	0.391780000000000	0.388150000000000	0.374960000000000	0.389600000000000	0.387070000000000	0.393540000000000	0.394930000000000	0.439140000000000	0.401050000000000	0.399460000000000	0.402610000000000	0.384930000000000	0.411870000000000	0.412500000000000	0.411500000000000	0.415500000000000	0.406220000000000	0.403660000000000	0.421010000000000	0.431370000000000	0.449260000000000	0.450300000000000	0.421350000000000	0.408820000000000	0.480070000000000	0.617820000000000	0.406330000000000	0.366580000000000	0.374420000000000	0.375690000000000	0.381980000000000	0.398570000000000	0.387750000000000	0.407510000000000	0.394120000000000	0.400700000000000	0.401510000000000	0.404870000000000	0.416250000000000	0.407470000000000	0.419120000000000	0.421620000000000	0.415790000000000	0.420580000000000	0.429940000000000	0.434060000000000	0.437480000000000	0.434340000000000	0.434030000000000	0.444870000000000	0.458390000000000	0.472460000000000	0.454190000000000	0.449040000000000	0.456780000000000	0.541460000000000	0.656050000000000	0.444820000000000	0.386750000000000	0.387980000000000	0.391210000000000	0.435020000000000	0.390490000000000	0.366130000000000	0.408730000000000	0.413810000000000	0.421320000000000	0.427710000000000	0.391970000000000	0.442180000000000	0.427110000000000	0.440760000000000	0.443570000000000	0.449120000000000	0.463000000000000	0.458120000000000	0.463150000000000	0.472610000000000	0.479320000000000	0.480220000000000	0.481860000000000	0.517710000000000	0.522680000000000	0.497540000000000	0.503910000000000	0.499150000000000	0.586330000000000	0.718410000000000	0.477940000000000	0.396940000000000	0.418840000000000	0.470900000000000	0.439240000000000	0.436790000000000	0.429990000000000	0.462130000000000	0.460750000000000	0.460260000000000	0.459550000000000	0.462630000000000	0.452280000000000	0.493740000000000	0.483100000000000	0.472090000000000	0.521820000000000	0.510300000000000	0.519200000000000	0.544550000000000	0.502950000000000	0.508560000000000	0.537520000000000	0.483400000000000	0.618450000000000	0.587270000000000	0.570840000000000	0.602850000000000	0.549490000000000	0.657240000000000	0.741220000000000	0.572640000000000	0.449180000000000	0.452610000000000	0.473300000000000	0.493110000000000	0.513440000000000	0.506540000000000	0.472040000000000	0.493880000000000	0.517390000000000	0.525890000000000	0.485250000000000	0.617580000000000	0.515230000000000	0.552810000000000	0.554020000000000	0.566870000000000	0.573850000000000	0.585470000000000	0.586390000000000	0.613910000000000	0.597180000000000	0.611710000000000	0.656170000000000	0.665230000000000	0.679210000000000	0.629970000000000	0.665920000000000	0.666950000000000	0.743090000000000	0.857120000000000	0.655650000000000	0.511740000000000	0.521940000000000	0.530180000000000	0.524970000000000	0.541340000000000	0.562810000000000	0.549620000000000	0.584130000000000	0.584830000000000	0.595450000000000	0.618370000000000	0.620190000000000	0.644510000000000	0.639990000000000	0.648690000000000	0.670970000000000	0.666490000000000	0.682670000000000	0.691670000000000	0.709380000000000	0.712880000000000	0.728490000000000	0.737460000000000	0.760930000000000	0.784400000000000	0.770740000000000	0.802200000000000	0.783150000000000	0.890180000000000	1.00960000000000	0.808300000000000	0.602340000000000	0.607320000000000	0.624690000000000	0.634900000000000	0.649390000000000	0.666820000000000	0.664510000000000	0.687470000000000	0.705130000000000	0.715390000000000	0.730920000000000	0.721660000000000	0.757420000000000	0.770280000000000	0.784570000000000	0.804110000000000	0.813890000000000	0.827560000000000	0.839420000000000	0.860830000000000	0.872200000000000	0.890480000000000	0.904350000000000	0.936910000000000	0.966130000000000	0.960960000000000	0.992770000000000	0.988010000000000	1.08740000000000	1.24010000000000	1.03740000000000	0.732460000000000	0.748160000000000	0.771650000000000	0.789590000000000	0.785730000000000	0.823490000000000	0.817370000000000	0.830930000000000	0.870530000000000	0.882610000000000	0.921560000000000	0.916240000000000	0.947550000000000	0.980810000000000	0.987670000000000	1.01780000000000	1.04050000000000	1.05680000000000	1.08420000000000	1.10000000000000	1.12880000000000	1.15810000000000	1.19330000000000	1.11290000000000	1.26680000000000	1.21880000000000	1.28340000000000	1.32280000000000	1.45850000000000	1.61160000000000	1.43590000000000	0.944240000000000	0.970290000000000	1.00770000000000	1.01480000000000	1.05510000000000	1.08100000000000	1.10440000000000	1.12730000000000	1.16690000000000	1.19600000000000	1.22960000000000	1.25600000000000	1.29270000000000	1.32780000000000	1.35930000000000	1.39210000000000	1.44260000000000	1.47360000000000	1.51360000000000	1.56190000000000	1.60200000000000	1.64410000000000	1.68750000000000	1.75140000000000	1.81260000000000	1.84490000000000	1.90550000000000	1.95040000000000	2.10410000000000	2.26600000000000	2.11430000000000	0.511740000000000	0.521940000000000	0.530180000000000	0.524970000000000	0.541340000000000	0.562810000000000	0.549620000000000	0.584130000000000	0.584830000000000	0.595450000000000	0.618370000000000	0.620190000000000	0.644510000000000	0.639990000000000	0.648690000000000	0.670970000000000	0.666490000000000	0.682670000000000	0.691670000000000	0.709380000000000	0.712880000000000	0.728490000000000	0.737460000000000	0.760930000000000	0.784400000000000	0.770740000000000	0.802200000000000	0.783150000000000	0.890180000000000	1.00960000000000	0.808300000000000	1.34300000000000	1.39340000000000	1.43670000000000	1.48150000000000	1.51200000000000	1.56000000000000	1.60370000000000	1.67780000000000	1.72000000000000	1.76250000000000	1.82190000000000	1.87690000000000	1.92700000000000	1.99130000000000	2.05350000000000	2.11960000000000	2.18030000000000	2.24720000000000	2.33110000000000	2.70220000000000	2.50410000000000	2.47850000000000	2.68580000000000	2.67530000000000	2.76940000000000	2.90480000000000	3.01520000000000	3.10770000000000	3.34710000000000	3.29700000000000	3.39230000000000	2.25540000000000	2.32500000000000	2.39230000000000	2.47440000000000	2.55720000000000	2.63160000000000	2.69310000000000	2.85520000000000	2.89030000000000	2.98510000000000	3.08380000000000	3.17050000000000	3.26300000000000	3.41470000000000	3.50400000000000	3.62230000000000	3.74530000000000	3.87010000000000	3.99920000000000	4.15380000000000	4.28780000000000	4.43560000000000	4.59190000000000	4.77820000000000	4.97120000000000	5.11710000000000	5.31250000000000	5.49180000000000	5.78600000000000	6.11340000000000	6.12480000000000	3.91030000000000	4.09930000000000	4.25520000000000	4.42030000000000	4.61910000000000	4.79290000000000	4.96550000000000	4.97070000000000	5.35970000000000	5.52070000000000	5.70990000000000	5.92660000000000	6.12490000000000	6.33280000000000	6.53810000000000	6.77670000000000	6.99820000000000	7.21600000000000	7.45660000000000	7.73380000000000	7.98140000000000	8.24720000000000	8.55140000000000	8.88260000000000	9.20440000000000	9.47580000000000	9.86630000000000	10.1680000000000	10.6370000000000	11.1240000000000	11.3550000000000	8.92140000000000	9.38280000000000	9.80320000000000	10.2520000000000	10.7390000000000	11.2400000000000	11.7490000000000	12.2810000000000	12.8350000000000	13.4250000000000	14.0150000000000	14.6550000000000	15.3280000000000	16.0360000000000	16.7070000000000	17.4850000000000	18.2980000000000	19.0850000000000	19.9210000000000	20.8870000000000	21.7620000000000	22.7620000000000	23.8790000000000	24.9690000000000	26.1220000000000	27.2200000000000	28.4990000000000	29.7680000000000	31.2010000000000	32.6900000000000	34.0670000000000	26.3840000000000	28.0340000000000	29.6150000000000	31.1840000000000	32.8390000000000	34.6110000000000	36.3720000000000	38.1620000000000	40.1270000000000	42.1560000000000	44.0880000000000	46.1570000000000	48.3900000000000	50.7260000000000	53.0090000000000	55.5720000000000	58.2990000000000	60.7920000000000	63.4540000000000	66.4510000000000	69.1310000000000	72.1030000000000	75.3510000000000	78.7740000000000	82.1990000000000	85.3890000000000	88.9980000000000	92.5250000000000	96.3210000000000	100.510000000000	104.270000000000	113.120000000000	119.430000000000	124.490000000000	129.960000000000	135.100000000000	139.760000000000	144.420000000000	149.040000000000	153.870000000000	158.770000000000	163.200000000000	167.770000000000	172.440000000000	177.460000000000	181.840000000000	186.340000000000	191.160000000000	195.600000000000	200.330000000000	205.740000000000	210.300000000000	215.240000000000	220.450000000000	225.800000000000	231.320000000000	236.130000000000	241.470000000000	246.450000000000	251.790000000000	257.920000000000	263.080000000000];
lf = [0.0813203663249874	0.0829161241547314	0.0756621511274890	0.0844390630871363	0.0858648648648649	0.0830068072389175	0.0905037244331042	0.0821627716277163	0.0811676738707365	0.0809901231557127	0.0825699977698031	0.0825778351346991	0.0833072446317480	0.0809307263912817	0.0810627326843059	0.0789664461434853	0.0806887171804778	0.0762506882718477	0.0770021095398078	0.0783805415113124	0.0773940987437920	0.0759945715393563	0.0752230558167201	0.0833073172611821	0.0803478756772170	0.0764118843499915	0.0767312810252732	0.0752477315008163	0.0861751416756012	0.110655557991668	0.0641779830300365	0.0775835443819878	0.0763103448275862	0.0779068343267739	0.0741511877301607	0.0954281167758125	0.0779522625760424	0.0793627776770789	0.0784340080646779	0.0795655112100493	0.0783211213762345	0.0779685548307790	0.0791626345413252	0.0765824279641001	0.0769061200812144	0.0790046382370785	0.0752735399863959	0.0800289967137058	0.0773174441214408	0.0761919409412488	0.0750350523384231	0.0729586446668331	0.0757873903362704	0.0724570549846223	0.0740280203508239	0.0777500419142714	0.0699779826099937	0.0695270998179724	0.0677068187749320	0.0916655709375059	0.106303817451206	0.0674460075292253	0.0762158223877274	0.0754948695160378	0.0758137568693762	0.0759371996155079	0.0769700720745902	0.0843014253384683	0.0778486166557429	0.0731310770936887	0.0757251007767181	0.0768474450124371	0.0752063535426464	0.0746475038409926	0.0755985034989435	0.0763560205381616	0.0760215260426677	0.0778880416874210	0.0758127909639014	0.0752183593081007	0.0749626208906637	0.0752869122773957	0.0744603708365426	0.0733309645809178	0.0737614165890028	0.0757327275749349	0.0790826873385013	0.0742536694966758	0.0744937716073094	0.0722449428723385	0.0836294839930259	0.107567634736917	0.0661222386123305	0.0725861163833138	0.0772833440721649	0.0761269146608315	0.0824561751801632	0.0772558763211863	0.0761750564223334	0.0733360715054079	0.0758670379529920	0.0752410387994713	0.0761936108422072	0.0760958785333051	0.0844240233774223	0.0767251439612787	0.0761964711492609	0.0763965844402277	0.0727394697556643	0.0776117434235321	0.0773805057402266	0.0769288291488288	0.0773382968822708	0.0753082071151814	0.0745145093406188	0.0775069496861135	0.0789375446044614	0.0827701831312871	0.0823609028057212	0.0760765550239235	0.0738675580449905	0.0873362683743269	0.108859287451105	0.0712709604995440	0.0725441304519908	0.0735743761053252	0.0734371945736737	0.0745646911845085	0.0775926178285670	0.0751002304816874	0.0785379767571839	0.0758360592649606	0.0767462795196415	0.0766401343793544	0.0770124781252378	0.0788785507191450	0.0769900803023146	0.0787360748436062	0.0790334976662230	0.0775221403933998	0.0782314317069995	0.0795949348341232	0.0800819157964651	0.0803039759168839	0.0793909594399459	0.0790381323524056	0.0807064330031566	0.0829064930367155	0.0846050534534319	0.0814588302813996	0.0802989932225819	0.0814849171379132	0.0970915220197963	0.113462236903547	0.0769464962203117	0.0752944612089945	0.0757403611517814	0.0754823647449255	0.0837962784605309	0.0749486574154047	0.0700606594079489	0.0779290358252779	0.0786202834669605	0.0795603897575345	0.0806224199355337	0.0732667900334586	0.0827215923972013	0.0798172338397713	0.0818632640552739	0.0820013680143457	0.0826043774140151	0.0847674844379348	0.0836855853716457	0.0841647131512475	0.0855108650418860	0.0863655200994613	0.0861103141586573	0.0860833214234672	0.0922834224598930	0.0921769187358917	0.0877696826432868	0.0883587585481326	0.0876101379576649	0.103810130840460	0.122008423626915	0.0810906191146779	0.0769397763175748	0.0806920201903441	0.0915435458786936	0.0834216473895125	0.0826049132893319	0.0810292842874910	0.0865882220681644	0.0859191436989520	0.0854993312527864	0.0851254978234695	0.0851910505478317	0.0831213702859663	0.0899688405400973	0.0878970925366617	0.0854306912775968	0.0943343698025888	0.0917805755395684	0.0926514151111746	0.0972150316879407	0.0883779367059692	0.0893637210283084	0.0946638019090557	0.0844057201725131	0.108111179092737	0.100382886347709	0.0986451925070851	0.103339218677683	0.0942343640136509	0.112751539688803	0.122542033825450	0.0949588750331653	0.0842517912743370	0.0842660857908847	0.0886030925905126	0.0919501006936675	0.0952914756593233	0.0935352229711015	0.0867274197104432	0.0903598807106135	0.0939240460371056	0.0955121685434072	0.0867990340756641	0.111315789473684	0.0924378341526427	0.0980559448001845	0.0978868511254815	0.0998872266567990	0.100604838709677	0.102178048482522	0.101902891700264	0.105841077185663	0.102381319755182	0.104667795972144	0.112200335145857	0.112798643493006	0.113860157913265	0.105372585096596	0.110873944822764	0.110651182082124	0.124268776025553	0.137273178622335	0.105345608792056	0.0940439217127630	0.0955146856986000	0.0967746645979739	0.0948798120368697	0.0976672019052087	0.101159321302754	0.0984558612783033	0.103928476114225	0.104240339369742	0.104711075159146	0.108562148876405	0.108273393854749	0.111793172830084	0.110539406186849	0.111468339204399	0.114715335954864	0.113358278765201	0.115386045568251	0.116290056827735	0.118573864206198	0.118582098241762	0.120387691697515	0.121334671514832	0.124648625626577	0.127040684115056	0.124566053592785	0.128712394705174	0.125448516691228	0.143081250502290	0.156767752053540	0.125017400046400	0.106871773034545	0.106881137587554	0.110069774817634	0.111327371558829	0.113349391702013	0.115777411233614	0.114875704456661	0.118150414188980	0.120237019353739	0.121729142915483	0.123549695740365	0.121191663727812	0.126540363539161	0.127949237566858	0.129680991735537	0.132037766830870	0.132760786232771	0.134296192918114	0.135257246902241	0.137796737686286	0.138823454510728	0.140796255889701	0.142144226839772	0.146421929454420	0.149137864497306	0.148099744166692	0.151815943602526	0.150629649957312	0.166040616888075	0.182222940605989	0.152482582238293	0.124948397332014	0.126765956725800	0.130407963225850	0.132610594202412	0.130970279865984	0.136599485775898	0.134855059312666	0.136740336037652	0.141773203263684	0.142413876563130	0.148363519278757	0.146380585688496	0.150297406614323	0.154043442069388	0.154606076734029	0.158060658767257	0.160489257014175	0.161429771633697	0.165161093761901	0.166087875585082	0.169187188057375	0.172387615361715	0.176018526713278	0.162559705525774	0.184039632153182	0.175665158110173	0.182901281192549	0.188516296370192	0.207246891651865	0.220513381861967	0.196585526135648	0.152787171728613	0.155664827055124	0.161433468969274	0.160442687747036	0.166024138093814	0.168721710629000	0.171137247609750	0.173574969975056	0.178239750717908	0.180951660488691	0.184788325994500	0.187152627736139	0.190987663440940	0.194529498805983	0.197483691941131	0.200556099809831	0.206041562522317	0.208654281830539	0.212536508649742	0.217108463880124	0.220825407327764	0.224502614941352	0.228444949843642	0.234822482033680	0.239375610786826	0.242421455133175	0.247609023338011	0.251908298353245	0.271188843635614	0.280369206404197	0.260834700650144	0.0940439217127630	0.0955146856986000	0.0967746645979739	0.0948798120368697	0.0976672019052087	0.101159321302754	0.0984558612783033	0.103928476114225	0.104240339369742	0.104711075159146	0.108562148876405	0.108273393854749	0.111793172830084	0.110539406186849	0.111468339204399	0.114715335954864	0.113358278765201	0.115386045568251	0.116290056827735	0.118573864206198	0.118582098241762	0.120387691697515	0.121334671514832	0.124648625626577	0.127040684115056	0.124566053592785	0.128712394705174	0.125448516691228	0.143081250502290	0.156767752053540	0.125017400046400	0.200900537031220	0.203092888688073	0.207970238267566	0.213058172143525	0.215114955611200	0.220177270930955	0.224447523477628	0.231996681415929	0.235981725136170	0.239479870103401	0.245073378082081	0.250186616902159	0.254258533560279	0.259998172061262	0.265145646110939	0.270654033761524	0.275293879973232	0.282457044457572	0.287573555717299	0.326917260486105	0.297982983280776	0.294397130266424	0.314828273355996	0.313021400072543	0.316549887411844	0.328378118676449	0.337538761208566	0.340782735516980	0.365435845925408	0.348328614292355	0.352622606598615	0.286298205082637	0.292537463668734	0.296142705058057	0.303276176935616	0.309824684686868	0.315101297954883	0.318921415375870	0.331229698375870	0.334131002751381	0.340232741032860	0.347505662546061	0.352246466980713	0.357738016927597	0.368435817481469	0.374087201605671	0.380805702150922	0.388194444444444	0.395360003269042	0.402658074909384	0.411471025260030	0.418812268021098	0.426336024605921	0.434715516425258	0.444980443285528	0.453576642335766	0.460709462501125	0.470049548752433	0.478629945964790	0.498492289135866	0.506957459159134	0.501416291444945	0.403464784663324	0.413694621051569	0.422310440651052	0.430199513381995	0.442824273799252	0.451436375623999	0.459811093619780	0.456362467866324	0.478715612718828	0.484229453556706	0.494534903862810	0.505510064824292	0.513446223488977	0.521862381540997	0.530001621271077	0.540019125029883	0.548405297390487	0.556704212312915	0.565751138088012	0.575688551436653	0.584204362465232	0.592854575515779	0.604083074314778	0.616119858500382	0.624238724991523	0.633536136925854	0.645193565262883	0.653932728792848	0.674337517433752	0.680741692674867	0.682720057720058	0.629864445072014	0.643539094650206	0.656698821007503	0.669802691754868	0.685059964276601	0.698657384385878	0.712665291762708	0.726557415843342	0.740196078431373	0.753536147283341	0.767104542966612	0.781058466130150	0.795474596502154	0.809367586937869	0.821952179474565	0.835643280443510	0.849528761780955	0.862949900524507	0.874917651192411	0.888732873797975	0.902163999668353	0.914614055531000	0.929578013080038	0.940381138897258	0.951863863280254	0.964085853934972	0.975826057181989	0.987624829965827	1.00318307504341	1.00693054058217	1.01735053455175	0.978635014836795	0.994113475177305	1.00823885881592	1.02135464430761	1.03449470766129	1.04707306005143	1.05837164639469	1.06887376410946	1.07891482039148	1.08820568419422	1.09557179066647	1.10325788177929	1.11123869012079	1.11780520052887	1.12314342013264	1.12825093899097	1.13413353046456	1.13800074878323	1.14086912745644	1.14501593865771	1.14679340433297	1.14813694267516	1.14853824345334	1.15085904628331	1.15073076492328	1.15158667008321	1.15180928715639	1.15060810306663	1.15303398494080	1.14859382677957	1.14500631417120	1.16559676039939	1.16312816517335	1.15901685131738	1.15366178428762	1.14910266224377	1.14576160026234	1.14021790620559	1.13606219986279	1.13073192239859	1.12594851428977	1.12003294214536	1.11489898989899	1.11072463768116	1.10684213809019	1.10092631833868	1.09521570471377	1.09022470628493	1.08534013982910	1.07878298330641	1.07368750652333	1.06778370144707	1.06134122287968	1.05619969336911	1.04920775056921	1.04179427130247	1.03647616539373	1.03099782246702	1.02342095427931	1.01902140920312	1.01105448843591	1.00370073633207];
ydata = [sm;lm;lf];
tdata = freq;
% scatter(freq,ydata);
fun = @(x)nlsqfun(x,tdata,ydata);
x0 = [1e-5,0.1,0.1,0.1,0,0,0,0,0.01];
% x0 = [7.1066e-08;0.5235;0.6678;0.0192;8.3181e+03;2.7365e+03;1.6327e+03;543.8365;0.1859];
% x0 = zeros(1,9);
A = [];
b = [];
Aeq = [];
beq = [];
lb = zeros(1,9);
ub = [0.01,1,1,1,inf,inf,inf,inf,1];
x = lsqnonlin(fun,x0,lb,ub,A,b,Aeq,beq)
E = fun(x);
%[tdata,idx] = sort(tdata);
%plot(tdata,E(idx),'o')
plot(tdata,E,'o')
function E = nlsqfun(x,tdata,ydata)
E0 = 3.73;
Tr = x(1); al =  x(2); bta = x(3); g = x(4); p = x(9); l1 = x(5); l2 = x(6); l3 = x(7); o = x(8); 
ER = (E0 + ((l1*(((tdata).*Tr).^(g+p)).*(cos(0.5*pi*(g+p)) + l2*cos(0.5*pi*p)*(((tdata).*Tr).^(g))))./(1+ l2*(((tdata).*Tr).^(g)).*(2*cos(0.5*pi*g) + l2*(((tdata).*Tr).^(g))))) + ((E0*o*(((tdata).*Tr).^(al+bta)).*(cos(0.5*pi*(al+bta)) + l3*cos(0.5*pi*bta)*(((tdata).*Tr).^(al)) + (((tdata).*Tr).^(al+bta))))./(1 + (((tdata).*Tr).^(al)).*(2*l3*cos(0.5*pi*al) + 2*cos(0.5*pi*(al+bta)*(((tdata).*Tr).^(bta))) + (((tdata).*Tr).^(al)).*(l3^2 + 2*l3*cos(0.5*pi*bta)*(((tdata).*Tr).^(bta)) + (((tdata).*Tr).^(2*bta)))))));
EI = (((l1.*(((tdata).*Tr).^(g+p)).*(sin(0.5*pi*(g+p)) + l2*sin(0.5*pi*p)).*(((tdata).*Tr).^(g)))./(1 + l2*(((tdata).*Tr).^(g)).*(2*cos(0.5*pi*g) + l2*(((tdata).*Tr).^(g))))) + ((E0*o*(((tdata).*Tr).^(al+bta)).*(sin(0.5*pi*(al+bta)) + l3*sin(0.5*pi*bta)*(((tdata).*Tr).^(al))))./(1 + (((tdata).*Tr).^(al)).*(2*l3*cos(0.5*pi*al) + 2*cos(0.5*pi*(al+bta))*(((tdata).*Tr).^(bta)) + (((tdata).*Tr).^(al)).*(l3^2 + 2*l3*cos(0.5*pi*bta).*(((tdata).*Tr).^(bta)) + (((tdata).*Tr).^(2*bta)))))));
% gs = ((E0*o*(((tdata).*Tr).^(al+bta)).*(sin(0.5*pi*(al+bta)) + l3*sin(0.5*pi*bta)*(((tdata).*Tr).^(al))).*(1 + l2*(((tdata).*Tr).^(g)).*(2*cos(0.5*pi*g) + l2*(((tdata).*Tr).^(g)))) + l1*(((tdata).*Tr).^(g+p)).*(sin(0.5*pi*(g+p)) + l2*sin(0.5*pi*p)*(((tdata).*Tr).^(g))).*(1 + (((tdata).*Tr).^(al)).*(2*l3*cos(0.5*pi*al) + 2*cos(0.5*pi*(al+bta))*(((tdata).*Tr).^(bta))) + (((tdata).*Tr).^(2*al)).*(l3^2 + 2*l3*cos(0.5*pi*bta).*(((tdata).*Tr).^(bta)) + (((tdata).*Tr).^(2*bta)))))./(E0*(1 + l2*(((tdata).*Tr).^(g)).*(2*cos(0.5*pi*g) + l2*(((tdata).*Tr).^(g)))).*(1 + (1+o)*(((tdata).*Tr).^(2*al + 2*bta)) + l3*(((tdata).*Tr).^(al)).*(2*cos(0.5*pi*al) + l3*(((tdata).*Tr).^(al))) + (2+o)*(((tdata).*Tr).^(al+bta)).*(cos(0.5*pi*(al+bta)) + l3*cos(0.5*pi*bta)*(((tdata).*Tr).^(al)))) + l1*(((tdata).*Tr).^(g+p)).*(cos(0.5*pi*(g+p)) + l2*cos(0.5*pi*p)*(((tdata).*Tr).^(g))).*(1 + 2*l3*cos(0.5*pi*al)*(((tdata).*Tr).^(al)) + 2*cos(0.5*pi*(al+bta))*(((tdata).*Tr).^(al+bta)) + (((tdata).*Tr).^(2*al)).*(l3^2 + 2*l3*cos(0.5*pi*bta)*(((tdata).*Tr).^(bta)) + (((tdata).*Tr).^(2*bta))))));
gs = EI./ER;
sm_exp = ydata(1,:);
lm_exp = ydata(2,:);
lf_exp = ydata(3,:);
E = gs.*sm_exp - lm_exp;
%E = sum((gs.*sm_exp - lm_exp).^2);
%ya = EI./ER;
%clf;
%loglog(sm_exp,lf_exp,'*');
%hold on;
%loglog(sm_exp,ya,"r");
%drawnow;
end
7 comentarios
  Torsten
      
      
 el 17 de En. de 2024
				You can do that by yourself. Use MATLAB online if your MATLAB supplies a different or no solution.
Ver también
Categorías
				Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




