Replace the first row of the matrix with zeros.

53 ビュー (過去 30 日間)
Wei Ding
Wei Ding 2017 年 8 月 31 日
回答済み: James Cai 2020 年 4 月 17 日
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

採用された回答

Ryan Klots
Ryan Klots 2017 年 8 月 31 日
編集済み: Ryan Klots 2017 年 8 月 31 日
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 件のコメント
Wei Ding
Wei Ding 2017 年 8 月 31 日
Thank you!It works!

サインインしてコメントする。

その他の回答 (1 件)

James Cai
James Cai 2020 年 4 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by