using "find" to find the index of value that is occuring a number of times
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!