Matlab programmingSolutionFollowing matlab code should do th
Matlab programming
Solution
Following matlab code should do the job:
function [out] = extractSeq4( r, c, mat )
     [ totalRows, totalCols ] = size( mat );
     out = [];
     if r > totalRows
         fprintf(\'Error: the given r exceeds the number of rows.\ \');
     elseif c > totalCols
         fprintf(\'Error: the given c exceeds the number of columns.\ \');
     elseif ( c + 3 > totalCols )
         fprintf(\'Error: Not enough numbers to make a sequence.\ \');
     else
         out = [ mat(r,c) , mat(r,c+1), mat(r,c+2), mat(r,c+3) ];
     end
 
 end
![Matlab programmingSolutionFollowing matlab code should do the job: function [out] = extractSeq4( r, c, mat ) [ totalRows, totalCols ] = size( mat ); out = []; i Matlab programmingSolutionFollowing matlab code should do the job: function [out] = extractSeq4( r, c, mat ) [ totalRows, totalCols ] = size( mat ); out = []; i](/WebImages/23/matlab-programmingsolutionfollowing-matlab-code-should-do-th-1054304-1761549785-0.webp)
