Does MATLAB have a "blackhole" or discard variable?
Say I'm doing something like:
[ rows cols ] = size( A ) ;
But I don't want rows to be stored. Is there a "black hole" variable where I can send values to die?
So the assign开发者_开发技巧ment would be like
[ BLACKHOLE, cols ] = size( A ) ;
Where BLACKHOLE means throw the value away and don't create a variable for it.
For 2009b or later, there is the tilde sign "~"
[~,cols] = size(A);
Alternatively, in your specific case
cols = size(A,2);
For compatibility with Matlab versions prior to 2009b you can use the following technique
[cols, cols] = size(A);
See http://blogs.mathworks.com/steve/2010/01/11/about-the-unused-argument-syntax-in-r2009b/ for example
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论