Using FPLOT to plot a multi variable function

17 vues (au cours des 30 derniers jours)
Naveen
Naveen le 5 Fév 2014
Lets say I have function f= (x^3+y^3+z^3). For a constant y and z, I want to plot function 'f' between xmin<x<xmax using fplot. Is this possible?

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Fév 2014
f = @(x,y,z) x^3+y^3+z^3;
ycon = 5;
zcon = .34;
fun = @(x) f(x,ycon,zcon);
xmin = -4;
xmax = 6;
fplot(fun, [xmin, xmax])
  5 commentaires
Walter Roberson
Walter Roberson le 11 Avr 2022
f = @(x,y,z) x.^3+y.^3+z.^3;
Manuel Ruivo de Oliveira
Manuel Ruivo de Oliveira le 11 Avr 2022
Thanks, that works. I have a related question about plotting a function given as an integral depending on a parameter, but that seems to deserve it's own post so I'll start a new discussion.

Connectez-vous pour commenter.

Plus de réponses (2)

Naveen
Naveen le 6 Fév 2014
Never mind. I found it
fplot(@(x) f(x,yvalue,zvalue), [xmin xmax])

Pratiksha Shinde
Pratiksha Shinde le 7 Août 2020
How to find FFT of boost converter Boost converter
  1 commentaire
Walter Roberson
Walter Roberson le 8 Août 2020
You should ask that in a new Question.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by