photo

Taif Ahmed BIpul


Last seen: 4 years ago Active since 2020

Followers: 0   Following: 0

Statistics

  • First Answer

View badges

Feeds

View by

Answered
[Assignment]Write a function called saddle that finds saddle points in the input matrix M.
function indices=saddle2(M) k=0; indices1=zeros(k); indices2=zeros(k); rowIndices=zeros(k); colIndices=zeros(k); for i=1:s...

4 years ago | 0

Answered
I get an error, what's wrong? on Sparse matrix logic and answer
function matrix=sparse2matrix(cellvec) m=ones(cellvec{1}(1),cellvec{1}(2)); m=m.*cellvec{2}; for i=3:length(cellvec) m(cellv...

4 years ago | 0

Answered
caesar cyphor encryption problem .
function coded=caesar(v,n) x=double(v)+n; q=x(x<32); p=x(x>126); while q<32; x(x<32)=x(x<32)+95; q=x(x<32); end ...

4 years ago | 0

Answered
Write a function called max_sum that takes v, a row vector of numbers, and n, a positive integer as inputs. The function needs to find the n consecutive elements of v whose sum is the largest possible.
function[summa,index]=max_sum(v,n) if size(v,2)<n summa=0; index=-1; return end p=size(v,2)-(n-1); k=1; A=...

4 years ago | 0

Answered
Write a function called halfsum that takes as input an at most two-dimensional array A and computes the sum of the elements of A that are in the lower right triangular part of A
function summa=halfsum(A) [m,n]=size(A); summ=0; for i=1:m for ii=i:n summ=summ+A(i,ii); end end summa=s...

4 years ago | 0