Matlab
Download
1 / 5

MATLAB - PowerPoint PPT Presentation


  • 90 Views
  • Uploaded on

MATLAB. Prvi koraki. Določene operacije. A = [12, 5; 3, 11] min(A) max (A) sum(A) diag (A). "Rezanje" matrik. Element A(2,3) Podmatrika A(2:4, 1:3) Vrstica A(2,:) Stolpec A(:,4). Komentiranje. % začne komentar matI = eye (5) % matI je identična matrika velikosti 5. Naloga.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'MATLAB' - mliss


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Matlab

MATLAB

Prvi koraki


Dolo ene operacije
Določene operacije

  • A = [12, 5; 3, 11]

  • min(A)

  • max(A)

  • sum(A)

  • diag(A)


Rezanje matrik
"Rezanje" matrik

  • Element

    • A(2,3)

  • Podmatrika

    • A(2:4, 1:3)

  • Vrstica

    • A(2,:)

  • Stolpec

    • A(:,4)


Komentiranje
Komentiranje

  • % začne komentar

  • matI = eye(5) % matI je identična matrika velikosti 5


Naloga
Naloga

  • Sestavi magični kvadrat velikosti 5 x 5 in preveri, če je vse OK (diagonali, stolpci in vrstice seštejejo v isto vsoto)

  • helpmagic

  • magKv = magic(5)

  • Hura – le še kontrole

    • sum(magKv)

      • Vsote po stolpcih

    • Kaj pa po vrsticah?

      • Sum(magKv')

    • Preverimo glavno diagonalo

      • sum(diag(magKv))

    • Kaj pa obratna?

      • Pomoč …

      • rot90

      • sum(diag(rot90(magKv)))