[Scilab-users] automatic traverse question

sgougeon at free.fr sgougeon at free.fr
Tue May 9 12:50:27 CEST 2017


Hello Erhy,

>resu(:,:)=abs(imdbl(:,:,1)-imdbl(:,:,2))*max(imdbl(:,:,1),imdbl(:,:,2));

This syntax of max() works element-wise and returns a matrix.
Then, if the matrix is not square, the * multiplication can't work here.
So, depending of what you want to do, you shall either use .* instead of *,
or fix the way you use max().

HTH
Samuel



More information about the users mailing list