Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this code on matlab the main equation is dy/dt = y+t , y(0)=1, n=3 the code is working but i need to add step to

this code on matlab
the main equation is dy/dt = y+t , y(0)=1, n=3
the code is working but i need to add step to get the value of n
i dont want the value of y
please show me the answer dont tell me how to do it this is new on me image text in transcribed
d.m* x + in mmm function Euler(n) to=0; % Initial time tn=10; % Final time N=3; % Number of time steps h=(tn-to)/N; % Time step t = zeros (N,1); y(1) = 1 ; % initial value of y is zero % For loop, sets next t,y values for n=1:N t(n+1)=t(n) +h; y.(n+1)=y(n) +h*f(t(n),y(n)); % Calls the function f(t,y)=dy/dt end plot(t,y) end % Include your own name %%equation function f - f(t,y) f - (y+t) : end in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

b. Did you suppress any of your anger? Explain.

Answered: 1 week ago

Question

Question May a taxpayer roll over money from an IRA to an HSA?

Answered: 1 week ago

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago