how to calling out the data in the matrix

i want to calling out the data in the matrix. for example; t=[1 2 3; 4 5 6; 7 8 9]
what coding can be used to calling out the specific data like calling 3 in the t matrix.

回答 (3 件)

Sean de Wolski
Sean de Wolski 2011 年 12 月 16 日

0 投票

What do you mean by "calling out"? Extract, replace, display etc?
Typically, when I think "calling out", I think either getting a free day off work or letting someone know they're lying to me. E.g:
  • Me: Do you want to go bar?
  • Friend: No, I have homework to do.
  • Me: Yeah right, you haven't done homework in a year, especially not on a Sunday during a football game!
to display or extract 3 from t above:
t13 = t(1,3)
Robert Cumming
Robert Cumming 2011 年 12 月 16 日

0 投票

do you mean
value = t(1,3);
.... if so you should look at:
Deep Kotak
Deep Kotak 2020 年 6 月 29 日

0 投票

Just you have to take some variable to store its value
x=t(1,3)
x=3
even if you want to replace that value with some another value then you need to write
e.g.
t(1,3)=5
then t=[1 2 5 ; 4 5 6 ; 7 8 9]

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2011 年 12 月 16 日

回答済み:

2020 年 6 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by