Matlab 3 variable function plot
Afficher commentaires plus anciens
The equation is:
f(X1,X2,X3)=bt1.x1+bt2.X2+bt3.X3+b1
bt1 to bt3 and b1 are all constants.
and I want to plot it in 3D. I tried a couple of functions like:
figure
syms x1 x2 x3
fimplicit3(Beta(1)*x1+Beta(2)*x2+Beta(3)*x3+b(1))
but it retunrs nothing.
6 commentaires
Tommy
le 7 Mai 2020
fimplicit3 wants a function handle. Try this:
fimplicit3(@(x1,x2,x3) Beta(1)*x1+Beta(2)*x2+Beta(3)*x3+b(1))
Zeynab Mousavikhamene
le 7 Mai 2020
Tommy
le 7 Mai 2020
Hmm, are you able to provide all of the code which you are running?
Zeynab Mousavikhamene
le 7 Mai 2020
Tommy
le 8 Mai 2020
I believe nothing shows because there are no solutions within the default interval [-5 5]. But yes, maybe I incorrectly assumed you were trying to plot solutions to f=0.
Zeynab Mousavikhamene
le 8 Mai 2020
Réponse acceptée
Plus de réponses (1)
Tommy
le 8 Mai 2020
You can pick any interval. Your plot will only show something if solutions to f=0 lie within the interval. [0, 0, -b1/Beta(3)] is a clear solution. -b1/Beta(3) is on the order of 1e11, so how about this:
Beta(1)= -294449.131783462;
Beta(2)=14.7170998874722;
Beta(3)=-0.127560549560172;
b(1)=87293272725.0805;
f=@(x1,x2,x3) Beta(1).*x1+Beta(2).*x2+Beta(3).*x3+b(1);
fimplicit3(f, [-5 5 -5 5 1e10 1e12])

Catégories
En savoir plus sur Spline Postprocessing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

