I have a matrix of 3 variables and want to calculate its Constants value so what should be the CALLING Equation in Custom type in CFTOOL???

1 回表示 (過去 30 日間)
Have 4 variables namely a,b,c and d (each having 50 values)
d=f(a,b,c) I made a matrix called X=[a b c] and Y=[d]
Then now using CFTOOL Entered xdata=X and ydata=Y
NOW in Custom equation what should I call as I want to relate it as Y=p.*X(column a)+q.*X(column b)+r.*X(column c)
p(with only column a) and q(with only column b) and r(with only column a)
and find out p ,q ,r
I have tried Y=p.*X(:,1)+q.*X(:,2)+r.*X(:,3) but it didn't work
what is the equation I should Enter in Custom Equation Block

回答 (1 件)

José-Luis
José-Luis 2016 年 7 月 4 日
You might be going overkill. You could obtain your answer in a much less convoluted way:
a = rand(50,1);
b = rand(50,1);
c = rand(50,1);
d = rand(50,1);
your_result = [a, b, c] \ d;
  2 件のコメント
chetan meena
chetan meena 2016 年 7 月 4 日
編集済み: chetan meena 2016 年 7 月 4 日
I do not want to do by this method because I want all the values LIKE R-SQUARED SSE RMSE and confidence percent
José-Luis
José-Luis 2016 年 7 月 4 日
編集済み: José-Luis 2016 年 7 月 4 日
Then you won't be able to use cftool since it takes at most a function of two variables and you have three.
Generalized linear models however, might give you what you are looking for.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by