plot the vector of two directions

3 ビュー (過去 30 日間)
sunderesh p
sunderesh p 2022 年 1 月 8 日
回答済み: Rishabh Singh 2022 年 1 月 12 日
clc
clear all
syms x y
F=input( 'enter the vector as i, and j order in vector form:');
P = inline(vectorize(F(1)), 'x', 'y');
Q = inline(vectorize(F(2)), 'x', 'y');
x = linspace(-1, 1, 10);
y = x;
[X,Y] = meshgrid(x,y);
U = P(X,Y);
V = Q(X,Y);
quiver(X,Y,U,V,1)
axis on
xlabel('x')
ylabel('y')
  1 件のコメント
Image Analyst
Image Analyst 2022 年 1 月 8 日
編集済み: Image Analyst 2022 年 1 月 8 日

サインインしてコメントする。

回答 (1 件)

Rishabh Singh
Rishabh Singh 2022 年 1 月 12 日
Hi,
Consider taking reference from this MATLAB Answer.
Hope this helps.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by