Dear all
I just began to work w Matlab. I have an array with decimal numbers and zeros from which I have to calculate log10 and write a new array, but it doesn't work. When i run this i got error "Attempted to access log10(0.946491); index must be a positive integer or logical." code is as follows
log10=zeros(2030,1354);for j=1:1354for i=1:2030log10(i,j)=R547(i,j)/R531(i,j);endendlog10(isnan(log10)) = 0 ; %my array
>> for j=1:1354for i=1:2030if log10(i,j)~=0X(i,j)=log10(double(log10(i,j)));endendend
Anyone please help me
Thank you
Best Answer