Filter löschen
Filter löschen

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

14 Ansichten (letzte 30 Tage)
Zhafirah Ariana
Zhafirah Ariana am 19 Jul. 2020
Beantwortet: Abhishek Gangwar am 19 Jul. 2020
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

Antworten (2)

madhan ravi
madhan ravi am 19 Jul. 2020
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 am 19 Jul. 2020
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, :)".

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by