photo

youssef


Last seen: 3 mois il y a Actif depuis 2023

Followers: 0   Following: 0

Statistiques

All
  • Community Group Solver
  • Promoter
  • First Answer
  • Solver

Afficher les badges

Feeds

Afficher par

Réponse apportée
I want to write a recursive Function that can calculate the sum of all the digit. If the input is 12345 then the answer will be 1+2+3+4+5 , without using string2num and loop.
function x=digit_sum(n) x=0; if n<=0 x=0; else x=x+mod(n,10)+digit_sum((n-mod(n,10))/10); end end

environ un an il y a | 0

Réponse apportée
write a function called saddle in the input matrix M , the function should return with exactly two column vector and each row of output vector represent dimensions of saddle point in the input matrix M
function indices=saddle(M) indices=[]; [a,b]=size(M); rows=cell(a,1); %making the ceLLs for i=1:a rows{i,1}=M(i,:); e...

plus d'un an il y a | 0