User Tools

Site Tools


matlab:asciunqoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
matlab:asciunqoc [2016/05/02 00:56] mithatmatlab:asciunqoc [2021/05/03 02:10] mithat
Line 1: Line 1:
-====== MATLAB exercise solutions ====== +====== MATLAB exercise solutions (Century College, CSCI 1081, Spring 2021) ======
-Century College, CSCI 1081, Spring 2016+
  
 <file matlab ex1.m> <file matlab ex1.m>
Line 14: Line 13:
  
 <file matlab ex3a.m> <file matlab ex3a.m>
-a = [2,  3,  1,  5; 1,  0,  3,  1,; 0,  2-3,  2; 0,  2,  3,  1,];+a = [2 3 1 5; 1 0 3 1; 0 2 -3 2; 0 2 3 1];
 % either works for multiplying a matrix with a scalar: % either works for multiplying a matrix with a scalar:
 disp(a * 7); disp(a * 7);
Line 21: Line 20:
  
 <file matlab ex3b.m> <file matlab ex3b.m>
-a = [2,  3,  1,  5; 1,  0,  3,  1,; 0,  2-3,  2; 0,  2,  3,  1,];+a = [2 3 1 5; 1 0 3 1; 0 2 -3 2; 0 2 3 1];
 b = inv(a); b = inv(a);
 disp(a * b); % result is (approx.) identity matrix disp(a * b); % result is (approx.) identity matrix
Line 27: Line 26:
  
 <file matlab ex3c.m> <file matlab ex3c.m>
-a = [2,  3,  1,  5; 1,  0,  3,  1,; 0,  2-3,  2; 0,  2,  3,  1,]; +a = [2 3 1 5; 1 0 3 1; 0 2 -3 2; 0 2 3 1]; 
-b = [ 1,2,3; 10,20,30;.1,.2,.3];+b = [1 2 3; 10 20 30; 0.1 0.2 0.3];
 matrixinfo(a); matrixinfo(a);
 matrixinfo(b); % square matrix of Inf values matrixinfo(b); % square matrix of Inf values
matlab/asciunqoc.txt · Last modified: 2021/12/07 20:32 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki