i don't know how to use lsqcurvefit in this case

1 回表示 (過去 30 日間)
Meddour Aissam riad
Meddour Aissam riad 2020 年 2 月 20 日
Hi everyone,
so these is my problem:
let suppose i have this equation Y=P*(a*x+b)
i have a data vector for x let's say x=[1 2 3 4 5 6 7 8 9] , and the initial value of P let'sz say P=5, and i need to find the the value of a and b that minimise the squared error between my function and another vector (Not an Y vector) with the function LSQCURVEFIT.
this is how my algorithm should work, my LSQCURVEFIT should give me a value for 'a' and 'b' and with those value i have to calculate the ydata for all the value of 'x'
i'll take the last value of Y and i should stock it in a new vector let's name it 'ANA'. the last value of my ydata will replace the value of my 'P' and then i should do the same calucation for 20 times for exemple (so we will use a for loop)
so in final i have to compare the value of thisvector (20 number) with an experminetal data that have also 20 number
how should i procceed , if you need more explanation i'm here

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by