필터 지우기
필터 지우기

Polynomial fitting with multiple variables and unequal matrix length

조회 수: 1 (최근 30일)
Md Jahirul Islam
Md Jahirul Islam 2014년 8월 21일
댓글: Md Jahirul Islam 2014년 8월 21일
Hi, Good day. Thanks in advance. I'm having problem with investigating relationship with some data. Say, A=1,2,3.. and for each A, there are 20 values of B and C correspond to B (I mean C depends on B). I can easily find a polynomial relationship between B and C but how can I create relationship between A, B and C? Please note that, I'm actually a new in Matlab, thus don't take it otherwise if the question seems somehow not appropriate.
In simple:
A=[1 2 3 4 5].
For A=1, B=[... ... ... 20 values] and C=[... ... ... 20 values]
For A=2, B=[... ... ... 20 values] and C=[... ... ... 20 values]
....
For A=5, B=[... ... ... 20 values] and C=[... ... ... 20 values].
Need to have a relationship between A, B and C.
Thanks again.

답변 (1개)

Iain
Iain 2014년 8월 21일
It kinda depeneds how those variables interact.
A "simple" method is to use the polyfit function to get a suitable relationship, for each value of A, for B to relate to C. (Quadratic/cubic/whatever).
So you get, for A = 1, C = d + eB + fB^2-hB^4 (or whatever)
Then you have 5 "A" values, 5 d values, on which you can do the same again...
To get something like d = A/4 + 0.1; e = A^2/20
  댓글 수: 1
Md Jahirul Islam
Md Jahirul Islam 2014년 8월 21일
Thank you very much Iain. It's helpful but could you please explain the last part a little more? Finally say, I've
A=[1
2
...
5] and
C=[ d1 + e1B + f1B^2 . .
d2 + e2B + f2B^2 . .
..
d5 + e5B + f5B^2 . .].
How can I get the relationship?
Thanks again.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by