Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

i want to initialize a matrix of 3x3 to value -1 how this colud be done?

Asked by Raman

Raman (view profile)

on 11 Apr 2013

M=zeros(3,3); intialize M with zeros of 3x3 but what to do if i want to initialize it with -1


-1 -1 -1
-1 -1 -1
-1 -1 -1

can anybody help me

1 Comment

Andrei Bobrov

Andrei Bobrov (view profile)

on 11 Apr 2013
M - 1

Raman (view profile)


No products are associated with this question.

1 Answer

Answer by Yao Li

Yao Li (view profile)

on 11 Apr 2013
Accepted answer


Yao Li

Yao Li (view profile)

Contact us