Question

Using MATLAB/OCTAVE, plot the vector field ?⃗=?2?̂−??̂ ?? ?ℎ? ??????−2<?<+2 ???−2<?<+2 Find the magnitude of the...

Using MATLAB/OCTAVE, plot the vector field ?⃗=?2?̂−??̂ ?? ?ℎ? ??????−2<?<+2 ???−2<?<+2

Find the magnitude of the vector field at the point (?0,?0)=(3,2).

write the type of code used

plots produced by this code

derivation or calculation required to write this code

Homework Answers

Answer #1

The vector field can be plotted using the quiver comment and the magnitude of the vector field is calculated at the last section of the command. code is explained in each line

code:

% initializing x values
clc; clear all;
x=linspace(-2,2,10);
% initializing y values
y=linspace(-2,2,10);
% creating mesh grid
[X,Y]=meshgrid(x,y);
% assigning components
u=Y.*Y; v=-X;
% ploting vector lines using quiver command
quiver(x,y,u,v)
xlabel('x')
ylabel('y')
% to find the value of magnitude vector fied at 3,2
x0=3;
y0=2;
A=sqrt((y0^(4))+(x0^(2)))

Output:

plot:

as the vector equation is given,

the magnitude will be

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using MATLAB/OCTAVE, plot the vector field ?⃗=?2?̂−??̂ ?? ?ℎ? ??????−2<?<+2 ???−2<?<+2 Find the magnitude of the...
Using MATLAB/OCTAVE, plot the vector field ?⃗=?2?̂−??̂ ?? ?ℎ? ??????−2<?<+2 ???−2<?<+2 Find the magnitude of the vector field at the point (?0,?0)=(3,2).
Using MATLAB, plot the vector field ? ⃗ = y2? ̂ − ?? ̂           ?? ?ℎ?...
Using MATLAB, plot the vector field ? ⃗ = y2? ̂ − ?? ̂           ?? ?ℎ? ?????? − 2 < ? < +2 ??? − 2 < ? < +2 Find the magnitude of the vector field at the point (?0,?0) = (3,2).
Using for loop and if statement, write a MATLAB code to plot a graph for x(t)...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t) as a function of time t in the range 0 to 12 in increment of 0.01 ?(?) = 1: 0 ≤ ? ≤ 1 2? − 1 1 ≤ ? ≤ 2 3 2 ≤ ? ≤ 3 −2.5? + 10.5 3 ≤ ? ≤ 5 −2 5 ≤ ? ≤ 6 4/3 ? − 10 6 ≤ ? ≤ 9 2 9 ≤...
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads...
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads data from a file and performs regression analysis using polyfit and polyval. The function shall have the following features: The input arguments shall include the file name (string), a vector of integers for the degrees of polynomial fits to be determined, and an optional plot type specifier (‘m’ for multiple plots, ‘s’ for a single plot - default). The data files will be text...
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for...
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for a non-negative integer value a. The script should then evaluates the sum Pn i=1 i a using a running sum for the case when n = 5. More specifically, use a counter for i that is used in the output fprintf as well as in the running sum. Feel free to write some code and just repeat it 5 times in your script. Sample...
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5...
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5 3.4 2] a). Plot a scatter plot of the data b). Determine the coefficients of the polynomial ?0 + ?1? + ?2?2 which best fits the data c). Plot this function on the same plot as in part ‘a’. USE MATLAB CODE ONLY! USE MATLAB CODE ONLY! THANK YOU
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for...
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for an integer between 0 and 9999, inclusive. The script should then calculate the digit in each of the 1000’s, 100’s, 10’s, and 1’s place of the number. Create a variable for each of the 4 extracted digits. For example, if your variables are named nThousands, nHundreds, nTens, and nOnes, then, in the case of 9471, they would be end up being set to 9,...
let us create a variable for a row vector a = [1, 4, 1, 3, 2,...
let us create a variable for a row vector a = [1, 4, 1, 3, 2, 5, 0] and calculate the mean value of its elements using the Matlab function ‘mean’ and store this value in variable aMean. Fig. 1 gives the Matlab code to do this. a = [1, 4, 1, 3, 2, 5, 0]; aMean = mean(a); Figure 1: Matlab code – row vector and mean of its elements. Let us now construct a row vector b that...
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x...
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x The input to the function is x and the output is y. Write the function such that x can be a vector (use element-by-element operations). (a) Use the function to calculate y(-1.5) and y(5). (b) Use the function to make a plot of the function y(x) for -2 ≤ x ≤ 6.
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis),...
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis), with the initial velocity of V0 (in the absence of air resistance), is calculated by the following formula: range=(Vo^2/g)(sin(2theta)) where (0<=theta<=pi/2) And the trajectory of object is given by:     h=tan(theta).x-(g/2Vo^2*cos^2(theta)).x^2 .Where h is the height of the object at each x location and g = 9.81 m/s2. a) Using π/8 increment size for the angle and V0 = 10 m/s, plot the trajectories of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT