How do you initialize an array of ninety '0

2019-02-26 00:36发布

问题:

I'm trying to initialize an array in matlab of ninety zero's. However, I don't want to write 90 consecutive zeros after even = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...... ] etc.

回答1:

Use the zeros function.

E.g. x = zeros(1,90)