subscriptors in matlab

how do i write for example x1, 1 be subscriptor? i think it's x_1 but i'm not sure. am i right?

1 件のコメント

Jan
Jan 2012 年 1 月 22 日
Do you want to access an element of an array, or use the 1 as subscript in a title or label of a diagram?

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

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 1 月 22 日

0 投票

x(1)
John D'Errico
John D'Errico 2012 年 1 月 22 日

0 投票

These are things you should try! If you think it is that, then try it! That form of a subscript will fail of course, but you would learn something. Experimentation in a tool like MATLAB is the way to learn.
Subscripts for arrays (and vectors, a subset of arrays) are done as x(1).
Subscripts for cell arrays, you do as x{1}, thus curly braces.

カテゴリ

ヘルプ センター および File ExchangeImage Data Workflows についてさらに検索

タグ

質問済み:

2012 年 1 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by