Manipulation Rules for Special Matrice

Respuestas (4)

jean claude
jean claude el 22 de Oct. de 2017
Editada: jean claude el 22 de Oct. de 2017
there is many ways to do it, you can for example assign i rows, j rows in a matrix of ones; then multiply by pi
x=ones(4,6)
y=x.*pi

3 comentarios

John D'Errico
John D'Errico el 22 de Oct. de 2017
Editada: John D'Errico el 22 de Oct. de 2017
Well, no, you don't HAVE to do it that way. In fact, I can think of at least a half dozen ways to solve the problem. Given that this is surely a homework problem, I would not supply those answer, nor would I have given a direct answer at all. Instead it is better to guide the person into solving it themselves.
another way; it means from the first to 4th row and from the first to 6th column.
mat(1:4,1:6)=pi
jean claude
jean claude el 22 de Oct. de 2017
of course there is a lot of alternatives .. i will rephrase it

Iniciar sesión para comentar.

Steven Lord
Steven Lord el 22 de Oct. de 2017

0 votos

Creating matrices is one of the fundamental operations in MATLAB. Take a look at the links on this documentation page. A number of the functions included on that page will be of use to you, both for this particular assignment and as you work more with MATLAB.
a=zeros(4,6)+pi
a = 4×6
3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416 3.1416

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 22 de Oct. de 2017

Respondida:

el 14 de Ag. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by