1 / 7

MATLAB

MATLAB. Prvi koraki. Matrike - vnos. Osnovni element Vnos: [ … ] Običajno jih shranimo v spremenljivko matA = [1 2 23; 3 5 6; 6 12 3; 3 4 1] matA je matrika dimenzije 4 x 3 Vrstice med sabo ločimo s ; Elemente v vrstici lahko ločimo tudi z vejico

nizana
Download Presentation

MATLAB

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MATLAB Prvi koraki

  2. Matrike - vnos • Osnovni element • Vnos: • [ … ] • Običajno jih shranimo v spremenljivko • matA = [1 2 23; 3 5 6; 6 12 3; 3 4 1] • matA je matrika dimenzije 4 x 3 • Vrstice med sabo ločimo s ; • Elemente v vrstici lahko ločimo tudi z vejico • matB = [1, 2, 23; 3, 5, 6; 6, 12, 3; 3, 4, 1] • Po vnosu se "rezultat" izpiše

  3. Matrike - vnos

  4. Računanje • Seštevanje, odštevanje, množenje • matA + matB, matC – matA • rez1 = matA + matB • Transponiranje • ' • matA' • [1, 2; 10, 15]' • Vektor stolpec • [1, 12, 23, 4, 5]'

  5. Množenje • matA * matB' (zakaj transponiranje?) • ans

  6. Posebne matrike • eye(4) • zeros(3) • diag([12, 3, 4, 78]) • ones(3)

  7. ; na koncu ukaza • Pomeni, da se rezultat ne izpiše • Koristno ob velikih matrikah • A = ones(100) • B = ones(100);

More Related