필터 지우기
필터 지우기

What does A=A((x:y,:) mean?

조회 수: 14 (최근 30일)
Zhafirah Ariana
Zhafirah Ariana 2020년 7월 19일
답변: Abhishek Gangwar 2020년 7월 19일
Hi! So I try tu run my program that include A=A((x:y,:)) in it but it said Unrecognized function or variable 'a'. I thought it was for declaring zeros matrix? I really have no idea for this

답변 (2개)

madhan ravi
madhan ravi 2020년 7월 19일
x = 1
y = 2
A = [1, 2;
3, 4;
5, 6]
A(x:y, :) % read about matrix indexing
doc zeros % to create a zeros matrix

Abhishek Gangwar
Abhishek Gangwar 2020년 7월 19일
Okay, so first check that you had defined matrix 'A' in you code before trying to access it and use single paranthesis for indexing, this should be "A=A(x:y, :)".

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by