using "find" to find the index of value that is occuring a number of times
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!