using "find" to find the index of value that is occuring a number of times

2 vues (au cours des 30 derniers jours)
hadiqa khan
hadiqa khan le 15 Fév 2018
Modifié(e) : Birdman le 15 Fév 2018
my data is like this i want the index no where my repeating value ends first column has hrs and second column has its corresponding data.
clear all;
close all;
clc;
t=59/60;
file1=xlsread('jan fof2.csv');
dat_fof2=sortrows(file1);
for i=0:24
hr(i+1,:)=((t+i)/24);
if i==24
hr(i+1)=1;
end
end
for k=1:25
indx2(k,1)=max(find(dat_fof2(:,1)<=hr(k,1)));
end
this routine worked for previosuly in another program and now it is giving me dimension error. help needed urgently how do i find index no for my value using loop? how do i remove this dimension error?

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by