MATLAB Programming Exercises - Prof. Rahman, Summaries of Capstone Design

A series of matlab programming exercises that cover various topics in linear algebra, matrix operations, and numerical computations. The exercises range from basic matrix manipulations to more advanced problems involving linear systems and matrix operations. The matlab code for each problem, along with the input and output. This resource could be useful for students studying matlab programming, linear algebra, or numerical methods, as it offers practical examples and hands-on practice with matlab. The exercises cover a wide range of topics, including matrix operations, linear systems, numerical computations, and problem-solving techniques. By working through these exercises, students can develop their matlab programming skills, deepen their understanding of linear algebra concepts, and enhance their ability to solve numerical problems using matlab.

Typology: Summaries

2022/2023

Uploaded on 09/06/2023

mdh060343
mdh060343 🇧🇩

2 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1 and 2
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download MATLAB Programming Exercises - Prof. Rahman and more Summaries Capstone Design in PDF only on Docsity!

  • 1 and

Problem 3

%Abdullah Al-amin Ridoy % clc clear all x=sqrt(144)+(log10(100))^2+exp(3)-asin(0.5)+csc(pi/6)-abs(-5) x =

Problem 4

Published with MATLAB® R2017a %Abdullah Al-amin Ridoy % clc clear all G=inputdlg('Enter a matrix','input'); M=str2num(G{:})

%Abdullah Al-amin Ridoy % clc clear all A=[1 1 1 1 ; 1 1 1 - 1; 1 1 - 1 1; 1 2 - 2 1]; B=[1; - 1; - 3; - 2]; X=inv(A)*B X =

  • 5 3 2 1 Published with MATLAB® R2017a

Problem 6

%Abdullah Al-amin Ridoy %

clc clear all p=[11 17 23 31 41]; n=length(p); for i=1:1:n for j=1:1:n q(i,i)=p(i); end end fliplr(q) ans = 0 0 0 0 11 0 0 0 17 0 0 0 23 0 0 0 31 0 0 0 41 0 0 0 0

count=0; for i=1: for j=1: count=count+1; b(count)=a(i,j); end end disp(b) 19 2 3 4 55 6 7 8 91 Published with MATLAB® R2017a

Problem 9

%Abdullah Al-amin Ridoy % clc clear all m=[11 14 21 44 57]; n=length(m); for i=1:1:n

u(i,i)=m((n+1)-i); end u u = 57 0 0 0 0 0 44 0 0 0 0 0 21 0 0 0 0 0 14 0 0 0 0 0 11 Published with MATLAB® R2017a

Problem 10

%Abdullah Al-amin Ridoy % clc clear all