# Help with isequal

3 messages
Open this post in threaded view
|

## Help with isequal

 Could someone with access to Matlab test the following?  The question at hand is whether isequal always returns a "full" value, or can occasionally return a sparse, logical value. t = isequal (sparse(1), sparse(1)) issparse (t) t = isequal (sparse(1), 1) issparse (t) t = isequal (1, sparse(1)) issparse (t) t = all (sparse([1 1 1])) issparse (t) Thanks, Rik
 In reply to this post by Rik-4 Result on Ubuntu 16.04 LTS and Matlab 2017b >> test t =   logical    1 ans =   logical    0 t =   logical    1 ans =   logical    0 t =   logical    1 ans =   logical    0 t =   sparse logical    (1,1)      1 ans =   logical    1 >> On 26/11/2017 20:33, Rik wrote: ```t = isequal (sparse(1), sparse(1)) issparse (t) t = isequal (sparse(1), 1) issparse (t) t = isequal (1, sparse(1)) issparse (t) t = all (sparse([1 1 1])) issparse (t) ``` -- Steph Bredenhann Pr.Eng, Pr.CPM Tel: 021 854 6927 Fax: 086 66 95 380 Mobile: 082 55 00 207 (sent from PC) Steph Bredenhann