hey asstitent I got this Operands to the logical AND (&&) and OR ( ) operators must be…
- User
hey asstitent I got this Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Error in saveImageReaccel2P>LaunchExportImagesRe_Callback (line 1185) if exist('hFigureLegend', 'var') && isgraphics(hFigureLegend)
- Assistant
The error you're encountering suggests that one or both of your operands for the
&&operator are not logical scalar values. In MATLAB, the&&operator is meant to work with scalar (single value) logical expressions, whereas&can work with arrays. Additionally, when using&&in anifstatement, both conditions must evaluate to a scalar logical (trueorfalse).In your specific code snippet:
if exist('hFigureLegend', 'var') && isgraphics(hFigureLegend)