Anúncio
Instructions Create a script called script15-m- The script should assu.docx
Próximos SlideShares
Introducing the central bank system of south Korea plz give lots of de.docxIntroducing the central bank system of south Korea plz give lots of de.docx
Carregando em ... 3
1 de 1
Anúncio

Mais conteúdo relacionado

Mais de rtodd972(20)

Anúncio

Instructions Create a script called script15-m- The script should assu.docx

  1. Instructions Create a script called script15.m. The script should assume a positive integer n is assigned in the command window. The script should create an n-by-n matrix Q according to the following examples: n 1; script15 10 0 1 n 2; script 15 1 0 0 0 0 1 0 0 0 0 20 0 0 0 2 n 4; script 15 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 4 Solution Option 2 is correct. you can create a sub-matrix taking a sub-part of a matrix. You can also select the elements in the m( th) through n (th) columns, for this we write: a(:,m:n) In this way, we will get option 2.
Anúncio