Manipulation Rules for Special Matrice

조회 수: 4 (최근 30일)
Azriel Faiz Abu Fadzil
Azriel Faiz Abu Fadzil 2017년 10월 22일
답변: Nhlamulo Neftor Baloyi 2022년 8월 14일
How to create a 4*6 matrix in which all elements have the value of pi

답변 (4개)

jean claude
jean claude 2017년 10월 22일
편집: jean claude 2017년 10월 22일
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
jean claude
jean claude 2017년 10월 22일
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 2017년 10월 22일
of course there is a lot of alternatives .. i will rephrase it

댓글을 달려면 로그인하십시오.


Steven Lord
Steven Lord 2017년 10월 22일
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.

Nhlamulo Neftor Baloyi
Nhlamulo Neftor Baloyi 2022년 8월 14일
a=zeros(4,6)+pi

Nhlamulo Neftor Baloyi
Nhlamulo Neftor Baloyi 2022년 8월 14일
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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by