Using FPLOT to plot a multi variable function

조회 수: 15 (최근 30일)
Naveen
Naveen 2014년 2월 5일
댓글: Manuel Ruivo de Oliveira 2022년 4월 11일
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?

채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 6일
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
Walter Roberson
Walter Roberson 2022년 4월 11일
f = @(x,y,z) x.^3+y.^3+z.^3;
Manuel Ruivo de Oliveira
Manuel Ruivo de Oliveira 2022년 4월 11일
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.

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

추가 답변 (2개)

Naveen
Naveen 2014년 2월 6일
Never mind. I found it
fplot(@(x) f(x,yvalue,zvalue), [xmin xmax])

Pratiksha Shinde
Pratiksha Shinde 2020년 8월 7일
How to find FFT of boost converter Boost converter

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by