plot an eight variable function
이전 댓글 표시
Hi everyone
I have an equation with 8 variables. I know how to plot a 3-variable equation in Matlab, but I need to plot this function with eight variables.
y= (5)*x(1)^2-(200)*x(1)+...
(0.3)*x(2)^2-(150)*x(2)+...
(0.4)*x(3)^2- (50)*x(3)+...
(2)*x(4)^2 - (82)*x(4)+...
(3)*x(5)^2 -(250)*x(5)+...
(5)*x(6)^2 - (23)*x(6)+...
(4)*x(7)^2 -(201)*x(7)+...
(12)*x(8)^2-(300)*x(8);
I really appreciate any help.
댓글 수: 3
dpb
2022년 8월 26일
No real way to do that in one go; there's a set of partial-variable diagnostic plots in the curve-fitting toolbox that can help, perhaps, but other than that not sure can do anything other than pick the combinations of sets of variables at a time.
Of course, unless this is defined by an a priori model with known, fixed coefficients, the first thing to do with a model would be to test for and reduce the complexity by any for which coefficients are not significant. That may not be fruitful in this case as all are apparently of such magnitude as to be significant depending upon the range of the various x variables.
That aside, the above is NOT a valid MATLAB expression; what is the functional form combining the terms shown? As is, this is interpreted by the MATLAB parsing engine as if it were
y= (5)*x(1)^2-(200)*x(1)(0.3)*x(2)^2-(150)*x(2)(0.4)*x(3)^2- (50)*x(3)...(12)*x(8)^2-(300)*x(8);
which is not a parseable expression.
BTW, as a coding style/MATLAB syntax observation, it is not necessary to use the parentheses surrounding the coefficients; one can just as easily write 5*x(1).
Walter Roberson
2022년 8월 26일
Are those terms being summed? If so then each of the lines describes a parabola in one dimension, and they are all independent.
shirin mhd
2022년 8월 27일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Orange에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!