PART C PLEASE!!! IF YOU KNOW HOW TO CODE MATLAB PLEASE HELP THANK YOU
Write a Matlab/Python script which computes the trajectory of P according to the system of equations (1) and the corresponding (non-dimensional) range for given values of (α,φ,0), varying values of φ 0 Plot the trajectories for 6 values of φ 0 of your choice in the interval 0< φ0 π/2.
Compute the corresponding range reached by each trajectory.
Note: Special attention will be given to the computation of R within a specified tolerance.
Function file to solve ODE
funNondimenTraj.m
function fval= funNondimenTraj(T,K)
%% function file for ODEs i.e system of governing eqautions
alpha=1.8;
V=K(1);
phi=K(2);
X=K(3);
Y=K(4);
fval(1,1)=-sin(phi)-alpha*(V^2);
fval(2,1)=-cos(phi)/V;
fval(3,1)=V*cos(phi);
fval(4,1)=V*sin(phi);
end
Script file for solving and plotting Non dimensional number as varies
runNondimenTraj.m
clc; clear all;
% Six values of Phi0
phi0=[pi/18, pi/9, pi/6, 2*pi/9, 5*pi/18, pi/3];
% plotting as phi0 varies in different subplot
for i=1:6
K0(:,i)=[1; phi0(i); 0; 0];
Tspan=[0 10];
[T,Ksol]=ode45(@(T,K) funNondimenTraj(T,K), Tspan, K0(:,i));
subplot(2,3,i), plot(T,Ksol);
legend({'V','phi','X','Y'});
xlabel('T');ylabel('Non dimensional Parameters');
hold on;
end
shg
% displaying min and max values of V, Phi, X, Y at end value of i
% so change i in for loop for differnet values of phi0
V=Ksol(:,1);
Vmin=min(V);
disp(['min value of V =',num2str(Vmin)]);
Vmax=max(V);
disp(['max value of V =',num2str(Vmax)]);
phi=Ksol(:,2);
phiMin=min(phi);
disp(['min value of phi =',num2str(phiMin)]);
phiMax=max(phi);
disp(['max value of phi =',num2str(phiMax)]);
X=Ksol(:,3);
Xmin=min(X);
disp(['min value of X =',num2str(Xmin)]);
Xmax=max(X);
disp(['max value of X =',num2str(Xmax)]);
Y=Ksol(:,4);
Ymin=min(Y);
disp(['min value of Y =',num2str(Ymin)]);
Ymax=max(Y);
disp(['max value of Y =',num2str(Ymax)]);
% subplot titles
subplot(2,3,1),title('pi/18');
subplot(2,3,2),title('pi/9');
subplot(2,3,3),title('pi/6');
subplot(2,3,4),title('2*pi/9');
subplot(2,3,5),title('5*pi/18');
subplot(2,3,6),title('pi/3');
Graphs
Ranges of Non dimensional numbers When T varies from 0 to 10 at 6 different values of
V |
0.5826 to 1 |
V |
0.5349 to 1 |
V |
0.4812 to 1 |
V |
0.4221 to 1 |
V |
0.3538 to 1 |
V |
0.3538 to 1 |
-1.5708 to 0.1745 |
-1.5708 to 0.3491 |
-1.5708 to 0.5236 |
-1.5708 to 0.6981 |
-1.5708 to 0.8727 |
-1.5708 to 0.8727 |
||||||
X | 0 to
0.7906 |
X | 0 to
0.7857 |
X | 0 to
0.7578 |
X | 0 to
0.7050 |
X | 0 to
0.6254 |
X | 0 to
0.6254 |
Y |
-6.8760 to 0.0126 |
Y |
-6.7665 to 0.0434 |
Y |
-6.6585 to 0.0844 |
Y |
-6.5558 to 0.1303 |
Y |
-6.4619 to 0.1775 |
Y |
-6.4619 to 0.1775 |
PART C PLEASE!!! IF YOU KNOW HOW TO CODE MATLAB PLEASE HELP THANK YOU Write a Matlab/Python scrip...
Help to solve part 1 and refer to part 2 if needed using matlab. 1. 2. Plot the solution showing each component vs. time, and also plot the trajectory in the 3-dimensional space (x,y,z) represented as a parametric curve with parameter t. The Lorentz attractor is given by the following set of coupled equations dx = o(y-x), dt dy = x(p- z), dt dz = xy - Bz, dt Write an anoymous function where x=(x, y, z), sigma=o, rho=p and...
please write in python. thank you In this question you will be writing the code to carry out a query on a database table in Python. The CREATE command shown below is given just for your reference, so that you know the structure of the table and its columns. The database is an SQLite database in the file named taxa.sqlite. create table species ( id int primary key, genus varchar ( 5 0 ), species varchar(50), common_name char(100) ) Write...
Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously...
ONLY NEED SOLUTION TO QUESTION 4 PLEASE, THANK YOU (PLEASE MAKE SURE TO PLOT THE SOLUTION IN MATLAB) Part A (Based off week 7 Workshop content) Consider the RLC circuit where R = 5, C = 1, L = 4 and Vs = 8. 1. Use circuit analysis laws to show that the resistor's voltage and induc tor's voltage can be modelled as the system of ODEs: L RC i the system of ODEs 3. Verify your answer for question...
Can you please help with this question? Please answer the question in MATLAB coding. Thank you in advance!! A storage tank (shown below) contains a liquid at depth y where y 0 when the tank is half full. Liquid is withdrawn at a constant flow rate Q to meet demands. The contents are resupplied at a sinusoidal rate 3Qsin2(t) A. The change in volume can be written as d(y) 30 sin2(t) Q dt where A is the surface area and...
Please solve only if you know how to do it. Write the code using C++ (not Python or Java). Show and explain everything neatly. COMMENTS (7.5% of programming assignment grade): Your program should have at least ten (10) different detailed comments explaining the different parts of your program. Each individual comment should be, at a minimum, a sentence explaining a particular part of your code. You should make each comment as detailed as necessary to fully explain your code. You...
write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle Objective: Write MATLAB scripts to solve differential equations. Implementation: MatLab is an ideal environment for solving differential equations. Differential equations are a vital tool used by engineers to model, study and make predictions about the behavior of complex systems. It not only allows you to solve complex equations and systems of equations it also allows you to easily present the solutions in graphical form....
please help me with this python code thank you 1. Write a Student class that stores information for a Rutgers student. The class should include the following instance variables: (10 points) o id, an integer identifier for the student o lastName, a string for the student's last name o credits, an integer representing the number of course-credits the student has earned o courseLoad, an integer representing the current number of credits in progress Write the following methods for your Student...
PLEASE HELP SOLVE WITH MATLAB LANGUGE. Below are hints to the problem. THANKS A LOT!! 2 Coriolis Force In a rotating frame-of-reference,the equations of motion of a particle, written in co- ordinates fixed to the frame, have additional terms due to the rotation of the frame itself Consider such a rotating frame, with its origin at the center of rotation.In these coor- dinates, the equations of motion for a point-mass subjected to forces F, and F S m, are F(0...
Could someone please help me write this in Python? If time allows, it you could include comments for your logic that would be of great help. This problem involves writing a program to analyze historical win-loss data for a single season of Division I NCAA women's basketball teams and compute from this the win ratio for each team as well as the conference(s) with the highest average win ratio. Background Whether it's football, basketball, lacrosse, or any other number of...