![]() |
Matlab如何忽略第一个索引= 1
下面的代码给我错误=下Subscript indices must either be real positive integers or logicals.因为使用FIND函数的第一个索引是i = 1,所以i-1给出负值。如何在不使用LOOP函数的情况下在i == 1时忽略
fid=fopen('data.txt'); A=textscan(fid,'%f%f%f%f'); fclose(fid); in = cell2mat(A); i = find(in(1:end,2)>20 & in(1:end,2) 20 & in(1:end,2) 1)); 顺便说一句,请小心使用i作为常规变量,因为您将覆盖以下默认值: i = sqrt(-1) [url=https://stackoverflow.com/questions/3083753]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 01:07。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.