MATLAB Answers

Set values in a matrix to zero

18 views (last 30 days)
Rohan  Mehta
Rohan Mehta on 21 Jun 2019
Commented: madhan ravi on 21 Jun 2019
I have a matrix which contains 957 data in it and after that nothing, I want to make that data to be same uptill 957 element and add other 43 elements besides it with value 0 how to do it ?

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 21 Jun 2019
data=[data;zeros(43,1)] % where data is of size 957 X 1

  1 Comment

madhan ravi
madhan ravi on 21 Jun 2019
Note: if your data is a row vector then just simply transpose

Sign in to comment.

More Answers (0)

Sign in to answer this question.