Community Profile

photo

Sakib Javed


Last seen: 1 month ago
4 total contributions since 2020

Sakib Javed's Badges

  • First Answer

View details...

Contributions in
View by

Answered
Homework: Write a function called char_counter that counts the number of a certain character in a text file.
function charnum = char_counter(fname,character) fid = fopen(fname,'rt'); if fid < 0 || ~ischar(character) charnum = -1; ...

1 month ago | 0

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

2 months 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.
ffunction [summa index] = max_sum(A,n) m=length(A); if n > m summa = 0; index = -1; return; end B = []; q=m-...

2 months ago | 0