フィルターのクリア

Index in position 1 exceeds array bounds (must not exceed 1).

1 回表示 (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019 年 9 月 3 日
編集済み: Walter Roberson 2019 年 9 月 3 日
Index in position 1 exceeds array bounds (must not exceed 1).
Error in jsondecode_v1 (line 257)
text(total_cellcount.time(find(isinf(ratio_mig_rim_cor))),(max(ratio_mig_rim_cor(~isinf(ratio_mig_rim_cor))-1)),'0
cell in core')
I tried running these:
>> total_cellcount.time(find(isinf(ratio_mig_rim_cor)))
>> max(ratio_mig_rim_cor(~isinf(ratio_mig_rim_cor))-1))
and each return one value.
I am trying to add a text at specific location in a figure and I get above error. Any suggestion?
Update:
I tried this: text(2,2,'0 cell in core')
I just gave static positions and I got the same error.
Index in position 1 exceeds array bounds (must not exceed 1).
Error in jsondecode_v1 (line 257)
text(2,2,'0 cell in core')
  7 件のコメント
Walter Roberson
Walter Roberson 2019 年 9 月 3 日
You created a vector named text instead of text being the name of a MATLAB plotting call.
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019 年 9 月 3 日
Great point @walter. I am not sure how I can press "accepted answer".

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

採用された回答

Walter Roberson
Walter Roberson 2019 年 9 月 3 日
編集済み: Walter Roberson 2019 年 9 月 3 日
You created a row vector named text instead of text being the name of a MATLAB plotting call.
... and then you access that row vector as if it were a 3D array, which is why you get the indexing error.

その他の回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019 年 9 月 3 日
Hi,
In your command to display the string: '0 cell in core'
One of your set logical indexes ( total_cellcount.time(find(isinf(ratio_mig_rim_cor))), (max(ratio_mig_rim_cor(~isinf(ratio_mig_rim_cor))-1))) has more than one value.
You can check this issue by running these commands:
>> total_cellcount.time(find(isinf(ratio_mig_rim_cor)))
>> max(ratio_mig_rim_cor(~isinf(ratio_mig_rim_cor))-1))
These should show how many values are obtained from each of your assigned x and y for your string display position.
Good luck.
  1 件のコメント
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019 年 9 月 3 日
Actually I ran these two lines before and they only show one value.

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

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by