Question
PLEASE HELP SOLVE WITH MATLAB LANGUGE.

2 Coriolis Force In a rotating frame-of-reference,the equations of motion of a particle, written in co- ordinates fixed to th

Note that the initial values of (0) and y(0) are i:(0)vo cos 0, y(0)= v0sin 0

SUMMER 2019 ENGINEERING 7 Moreover, while the ball is in the air, neglecting air-resistance, there are no forces acting in th
Below are hints to the problem. THANKS A LOT!!

9696 Problem 2 % Another ODE problem % Coriolis Force % Initial velocities are given along % Given in terms of ve and theta x
0 0
Add a comment Improve this question Transcribed image text
Answer #1

THE FUNCTION odefun IS NESTED SO THE ENTIRE CODE BELOW SHOULD BE SAVED AS ONE FILE coriolis.m:

%

function coriolis

clc,clear,close all

%% coriolis.m
% let dxdt = p, dydt = q

%% part a)
%
R = 1;
v0 = 1.1854; theta = -1.0039; Tfinal = pi;
x0 = R; y0 = 0; p0 = -v0*cos(theta); q0 = v0*sin(theta);
cond = [x0 y0 p0 q0];
% solving with ode45
t = linspace(0,Tfinal,100);
[T,SOL] = ode45(@odefun,t,cond);
X = SOL(:,1)
Y = SOL(:,2)
% plotting the solution
figure
plot(X,Y,'- b')
xlabel('x(t)'),ylabel('y(t)')
title(['(v0,theta,Tfinal) = (' num2str(v0) ',' num2str(theta) ',' num2str(Tfinal) ')']),grid on

%% part b)
%
R = 1;
v0 = 1.0223; theta = -1.3617; Tfinal = 3*pi;
x0 = R; y0 = 0; p0 = -v0*cos(theta); q0 = v0*sin(theta);
cond = [x0 y0 p0 q0];
% solving with ode45
t = linspace(0,Tfinal,100);
[T,SOL] = ode45(@odefun,t,cond);
X = SOL(:,1);
Y = SOL(:,2);
% plotting the solution
figure
plot(X,Y,'- b')
xlabel('x(t)'),ylabel('y(t)')
title(['(v0,theta,Tfinal) = (' num2str(v0) ',' num2str(theta) ',' num2str(Tfinal) ')']),grid on


%% part c)
%
R = 1;
v0 = 1.0081; theta = -1.4442; Tfinal = 5*pi;
x0 = R; y0 = 0; p0 = -v0*cos(theta); q0 = v0*sin(theta);
cond = [x0 y0 p0 q0];
% solving with ode45
t = linspace(0,Tfinal,100);
[T,SOL] = ode45(@odefun,t,cond);
X = SOL(:,1);
Y = SOL(:,2);
% plotting the solution
figure
plot(X,Y,'- b')
xlabel('x(t)'),ylabel('y(t)')
title(['(v0,theta,Tfinal) = (' num2str(v0) ',' num2str(theta) ',' num2str(Tfinal) ')']),grid on

%% function to express the ode as a system of equations
%
function [ ode ] = odefun(t,in)
% dxdt = p, dydt = q
%
omega = 1;
%
x = in(1); y = in(2); p = in(3); q = in(4);
%

dxtd = p; % x'
dydt = q; % y'
dpdt = 2*omega*q + omega^2*x; % x''
dqdt = -2*omega*p + omega^2*y; % y''
%
ode = [
dxtd;
dydt;
dpdt;
dqdt;
];

end


end

(v0, theta, Tfinal) = (1.1854,-1.0039,3.1416) y(t) 0 0.1 0.2 0.3 0.4 0.6 0.7 0.8 0. 9 1 0.5 X(t)

(v0,theta, Tfinal) = (1.0223,-1.3617,9.4248) y(t) -0.4 -0. 2 0 0.2 0.4 0.6 0.8 1 12 X(t)

(v0, theta, Tfinal) = (1.0081,-1.4442,15.708) y(t) -0.8 -0.6 -0.4 -0.2 0 0.4 0.6 0.8 1 0.2 X(t)

------------------------------------------------------------------------------
COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,

IF YOU'RE SATISFIED, GIVE A THUMBS UP
~yc~


Add a comment
Know the answer?
Add Answer to:
PLEASE HELP SOLVE WITH MATLAB LANGUGE. Below are hints to the problem. THANKS A LOT!! 2...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT