Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the answers to be for matlab entry, please. Reminder Every axis should be labeled with title and units. Example solution for Problem 7

I need the answers to be for matlab entry, please.

image text in transcribed

Reminder

Every axis should be labeled with title and units.

Example solution for Problem 7

n = 100; %assign the number of time steps

lambda = 5;

finalt = 10;

deltat = finalt / n;

t = linspace(0,10,n);[1]

N(1)=100;[2]

for i=1:1:(n-1)[3] %the index of the for-loop must be a variable

N(i+1)=N(i)+deltat*(-1)*lambda*N(i); %finite difference for N(t)

end %for-loop must be ended with an end statement

plot(t,N); %plot results

Explanation:

[1] 0 and 10 mean initial time starts from 0 second and end at 10 seconds. n means there are n partitions in the domain of 0 to 10, which also means there are n+1 nodes from 0 to 10. t is a row vector with n+1 nodes. The time step size is (10-0) / n.

[2] In Matlab, the first element in a Matrix is N (1), not N (0). So the initial condition marks as N (1), not N (0). Before using a matrix, it should be defined. When using a for-loop, we should assign the first element value before the for-loop.

[3] for statement has the following general structure:

for index=expression

statement group

end

Problem 1 Problem 5 plot the function: f( + h* tan as a finction of beta, where h-1. plot the function over-4.1K

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_2

Step: 3

blur-text-image_3

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

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

3. Who would the members be?

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago