Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


dpb
Posts:
8,296
Registered:
6/7/07


Way to write expression????
Posted:
Mar 19, 2013 10:36 AM


Just had occasion responding to another posting where to check a matching set of values had to nest calls to all() if were to get down to a single value. Made me wonder if is any other syntax I'm overlooking...
Example...
x=rand(3,3,3); y=some_function(size(x), inputs); % assume returns size(x) result
Now, question to be determined is whether plane_1 of x == plane_1 y?
Obviously
all(all(x(:,:,1))==all(all(y(:,:,1))
answers the question, but the question posed is there a way w/o the nested all() that isn't at least or more verbose?
all(x(:,:,1)(:)) would be useful here but can't...



Date

Subject

Author

3/19/13


dpb

3/19/13


dpb


