MATLAB Answers


Error while loading data with figure

Asked by Rafnuss
on 24 Sep 2015
Latest activity Commented on by Dasharath Gulvady on 28 Sep 2015
I saved in a .mat file a bunch of variables, amongst which severale figure. When I try to load the file a receive the following error:
Operands to the || and && operators must be convertible to logical scalar values.
Error in (line 58)
I noticed that the error only shows-up when I running with the debugger on "stop on error". To load the data, I am using:
load(['data_gen/data/' gen.filename], 'K_true', 'g_true', 'rho_true', 'K', 'g', 'G','grid', 'gen')
The file is 17.7MB. Thanks for your help.

  1 Comment

1. Could you show your MATLAB code which saves the figure?
2. Do you see this error message for any figure? Or is this specific for some figures?
fig1 = figure;
save test fig1
load test
3. Which release of MATLAB are you using?

Sign in to comment.

0 Answers