how to plot a vector?

조회 수: 1 (최근 30일)
Jong Hyun Lee
Jong Hyun Lee 2022년 4월 1일
답변: KSSV 2022년 4월 2일
The vector questionis F=e^y i + x*e^y j
how do I plot this equation on matlab
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 4월 1일
편집: Walter Roberson 2022년 4월 1일
Do I understand correctly that you want a plot with four independent directions?
  1. x
  2. y
  3. complex direction #1, "i"
  4. complex direction #2, "j"
And then F would be the dependent direction, for a total of 5 dimensions in the plot ?
I am not clear as to whether you want exp(1i*y) or exp(y)*1i ?
This will not be a vector. You have absolute minimum of two independent directions, x and y, so your result cannot be less than a surface.

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

답변 (1개)

KSSV
KSSV 2022년 4월 2일
x = linspace(-1,1) ;
y = linspace(-1,1) ;
[X,Y] = meshgrid(x,y) ;
% F = e^y i + x*e^y j
u = exp(Y) ;
v = X.*exp(Y) ;
quiver(X,Y,u,v)

카테고리

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