Subscript indices must either be real positive integers or logicals
Show older comments
I have this simple program code
%------------------------GPS data loading---------------------------------%
data = load('data/sorted_coord.dat');
%--------------------------fault parameter info---------------------------%
fault = load('data/fault.dat');
fa_lat = fault(:,2);
fa_lon = fault(:,3);
length = fault(:,5)*1000; %convert to meters
width = fault(:,6)*1000; %convert to meters
depth = fault(:,4)*1000; %convert to meters
dip = fault(:,8);
strike = fault(:,7);
ss = fault(:,10).*cosd(fault(:,9));
ds = fault(:,10).*sind(fault(:,9));
op = zeros(1,2)';
when I try to this command:
m = length(fa_lat);
then it will return error
Subscript indices must either be real positive integers or logicals.
does anyone has solution to resolve this error?
Accepted Answer
More Answers (1)
hidayat
on 17 Nov 2014
0 votes
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!