[Scilab-users] surf and %nan

Rafael Guerra jrafaelbguerra at hotmail.com
Tue Nov 21 20:01:40 CET 2017


It is not the most compact form but I think there is no issue with original syntax proposed:
[a,b]=find(M==-999);
M(a,b) = %nan;


-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of sgougeon at free.fr
Sent: Tuesday, November 21, 2017 6:50 PM
To: Users mailing list for Scilab <users at lists.scilab.org>
Subject: Re: [Scilab-users] surf and %nan

Hello Richard,

>----- Mail original -----
>Envoyé: Mardi 21 Novembre 2017 17:41:40
>
>Hi all,
>I have a big matrix, which I want to surf plot. However there are actually
>only values for a non-rectangular shape and i want to blank out those other
>values (which are -999 by default).
>
>[a,b]=find(M==-999);
>M(a,b) = %nan;

The syntax is:
M(M==-999) = %nan;
or
M(find(M==-999)) = %nan;

Then

surf(M);

should be OK.

HTH
Samuel

_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


More information about the users mailing list