Filter löschen
Filter löschen

plot the vector of two directions

2 Ansichten (letzte 30 Tage)
sunderesh p
sunderesh p am 8 Jan. 2022
Beantwortet: Rishabh Singh am 12 Jan. 2022
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')

Antworten (1)

Rishabh Singh
Rishabh Singh am 12 Jan. 2022
Hi,
Consider taking reference from this MATLAB Answer.
Hope this helps.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by