how to plot the function

조회 수: 1 (최근 30일)
Satyajit Kumar
Satyajit Kumar 2022년 7월 8일
편집: Torsten 2022년 7월 9일
f=0.18x+0.003xy+10
in x y plane
  댓글 수: 2
Satyajit Kumar
Satyajit Kumar 2022년 7월 8일
0.18x+0.003xy+10=0 If this has to be plotted in x y plane then
How can we do ,?
Torsten
Torsten 2022년 7월 8일
fimplicit(@(x,y)0.18*x + 0.003*x.*y+10,[-1000 1000 -1000 1000])

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

채택된 답변

Sam Chak
Sam Chak 2022년 7월 8일
Follow me, type this out using this example.
Then, you put your equation that you want to plot on the x–y plane.
x = linspace(-60, 60, 1201);
y = -(20*(500 + 9*x))./(3*x);
plot(x, y)
ylim([-6000 6000]), xlabel('x'), ylabel('y')

추가 답변 (1개)

Abderrahim. B
Abderrahim. B 2022년 7월 8일
편집: Abderrahim. B 2022년 7월 8일
Try this:
clear
close all
N = 10 ;
x = -N:0.5:N;
y = x;
[X, Y] = meshgrid(x, y);
f = @(x,y)(0.18*x + 0.003*x.*y + 10) ; % Create function
% Using countouf (x y plane)
tiledlayout(2,1)
nexttile
contourf(X, Y, f(X,Y));
% Using surf (3D) plot)
nexttile
surf(X, Y, f(X,Y))
  댓글 수: 11
Satyajit Kumar
Satyajit Kumar 2022년 7월 9일
To all , don't create fuss of assignment and all , Always Somewhere is starting to learn something ! so as I am ! I am trying to understand things that's all
Torsten
Torsten 2022년 7월 9일
편집: Torsten 2022년 7월 9일
Learning MATLAB primarily means trying and testing. That's what we miss in your attempts to understand the language.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by