Replace the first row of the matrix with zeros.

조회 수: 87 (최근 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개)

James Cai
James Cai 2020년 4월 17일
A(1, :) = 0

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by