Lecture: 1-4 1. Now The 2 Main Data Types in MATLAB:-scalars and Matrices or Arrays or Vectors

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Lecture: 1-4

1. Now the 2 main data types in MATLAB :- scalars and matrices or arrays or vectors.

2.
3.

4.

5. Fibonnachi Series:- Using For loop

%%Fibonacchi Series using For loop%%


n=10;
fibo=[1,1];
for i=3:n
fibo(i)=fibo(i-1)+fibo(i-2);
end

6. Fibo using while

%%Fibonacchi Series using while loop%%


fibo=[1,1];
while (fibo(end)<200)
fibonew=fibo(end) + fibo(end-1);
fibo=[fibo,fibonew];
end

Solution:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy