matrix starting index from zero

hello everybody how we can change matrix first index? i mean that start from zero instead of one. for example
a=[60,78;100,400;200,600]
a(0,0)=60
a(1,0)=100

1 件のコメント

Sagar Damle
Sagar Damle 2014 年 8 月 4 日
But why do you want the index to start from zero ? In MATLAB,it starts from one and this does not pose any problem !!

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

回答 (2 件)

Roger Wohlwend
Roger Wohlwend 2014 年 8 月 4 日

0 投票

You cannot do that. The first element is a(1,1) and there's no way to change that.

1 件のコメント

mahsa
mahsa 2014 年 8 月 5 日
i found it...

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

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 8 月 4 日
編集済み: Azzi Abdelmalek 2014 年 8 月 4 日

0 投票

Subscript indices must either be real positive integers or logicals
you can work with your indices by adding 1 to them
a(0+1,0+1)
a(1+1,0+1)

3 件のコメント

mahsa
mahsa 2014 年 8 月 5 日
thanks a million i found it
Mahnoor Naseer
Mahnoor Naseer 2021 年 4 月 3 日
pls tell me how you did it
Rik
Rik 2021 年 4 月 3 日
It is unlikely mahsa is still monitoring this thread. Why don't you explain why you want this?

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

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

2014 年 8 月 4 日

コメント済み:

Rik
2021 年 4 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by