MATLAB Answers

how to find index of the double

51 views (last 30 days)
Muhammad
Muhammad on 29 May 2021
Answered: Image Analyst on 29 May 2021
i want to find the indese of the following data
what should be the code for this
  1 Comment
Jan
Jan on 29 May 2021
The question is not clear. What are "the following data"? Do you want to sort the vector?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 29 May 2021
@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);

More Answers (1)

Asmit Singh
Asmit Singh on 29 May 2021
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 Comments
Asmit Singh
Asmit Singh on 29 May 2021
What do you mean by index of all data? Do you mean that you want to load the data into your workspace ?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!