Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by