Matlab Programming Assignment
Matlab Programming Assignment
1- Write a matlab script file to receive a number from the user and calculate its sum-
mation.
2-Write a matlab script file to receive a number from the user and calculate its
factorial.
3-Write a matlab script file to receive a matrix from the user and calculate the
sum of all its elements. (without using matlab built in function)
4-Write a matlab script file to receive a matrix from the user and calculate the
sum of diagonal elements. (without using matlab built in function)
5-Write a matlab script file to receive a matrix from the user and calculate the
sum of the elements of each column (without using matlab built in function)
6-Write a matlab script file to receive a matrix from the user and calculate the
sum of the elements of each row (without using matlab built in function)
7-Write a matlab function file to receive a matrix as input and find the
maximum element in that matrix and its index (without using matlab built in function)
8-Write a matlab function file to receive a matrix as input and find the
minimum element in that matrix and its index (without using matlab built in function)
9-Write a matlab function file to receive a matrix as input and sort (in
ascending order) the elements of each column (without using matlab built in function)
10- Write a matlab function file to receive a matrix as input and sort (in
descending order) the elements of each row (without using matlab built in function)
11- Write a matlab function file to receive a matrix as input and sort (in ascending or-
der) all its element and return the sorted matrix as column vector (without using
matlab built in function)
12- Write a matlab function file to generate the Fibonacci series for n elements ,
where n is an input to the function, run the function for n=8.
1 + 1 + 2 + 3 + 5 + 8 + 13 + …….
13- Write a MATLAB function to return the sum and the series elements of the
following series until N-terms:
Then explain how to save and run such function to generate the output until the
term N=10