MATLAB Answers

how to find index of the double

50 ビュー (過去 30 日間)
Muhammad
Muhammad 2021 年 5 月 29 日
回答済み: Image Analyst 2021 年 5 月 29 日
i want to find the indese of the following data
what should be the code for this
  1 件のコメント
Jan
Jan 2021 年 5 月 29 日
The question is not clear. What are "the following data"? Do you want to sort the vector?

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

採用された回答

Image Analyst
Image Analyst 2021 年 5 月 29 日
@Muhammad SULAMAN, you ask "i am tring to find the index of all the data written in double data", so here is a list of all the indexes of all the data in your vector:
allIndexes = 1 : length(covid);

その他の回答 (1 件)

Asmit Singh
Asmit Singh 2021 年 5 月 29 日
In my understanding you are trying to find an index of a particular value in double. You can use the find function. You can know more using the documentation here. Here is code for a simple example.
% load your double data into a
a
% searching for the value 1000
output=find(a==1000);
  2 件のコメント
Asmit Singh
Asmit Singh 2021 年 5 月 29 日
What do you mean by index of all data? Do you mean that you want to load the data into your workspace ?

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

Community Treasure Hunt

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

Start Hunting!

Translated by