MATLAB Answers

0

Replace the first row of the matrix with zeros.

Asked by Wei Ding on 31 Aug 2017
Latest activity Edited by Ryan Klots on 31 Aug 2017
Hi! I am quite new in Matlab and really don't know how to replace the first row of this matrix with zeros, please help me. 1 2 3 2 3 4 3 4 5 6 7 8 9 10 11 12 13 14

  0 Comments

Sign in to comment.

1 Answer

Answer by Ryan Klots on 31 Aug 2017
Edited by Ryan Klots on 31 Aug 2017
 Accepted Answer

You could try something like
% A is the name of your matrix
% n is the number of columns in your matrix
A(1, :) = zeros(1, n)

  1 Comment

Thank you!It works!

Sign in to comment.