Jump to content

Modifica Stile
Primario: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Secondario: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Sfondo: Blank Waves Squares Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Corsi di Laurea










ROX @ Unisa - Forum degli studenti di Ingegneria utilizza i cookie. Se prosegui la navigazione accetti il loro uso.    Accetto l'uso dei cookie
-->
Photo

prova matlab 21 gen 2015

fondamenti di informatica

  • Please log in to reply
1 reply to this topic

#1
Sofia

Sofia

    Member

  • Utente
  • PipPip
  • 19 posts

Salve ragazzi,ieri nella prova di informatica si chiedeva di estrarre una sottomatrice dalla matrice...qualcuno mi spiega come si fa??? La prova era matlab 3+2 e mi riferisco al quinto esercizio... grazie 





#2
Gianfranco06061994

Gianfranco06061994

    Newbie

  • Utente
  • Pip
  • 1 posts

function Sottomatrice=calcola_sottomatrice(A,i,j,n,x)
p=0;
m=0;
S=[];
for h=i:(i+n-1)
    p=p+1;
    for k=j:(j+x-1)
        m=m+1;
        S(p,m)=A(h,k);
    end
    m=0;
end
Sottomatrice=S;
end


  • peppepeppo and Debora* like this





Also tagged with one or more of these keywords: fondamenti di informatica

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users