Problem 43333. Save variables

Solution 2059893

Submitted on 17 Dec 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
a = 1; savevar(a) ii=ls('a.mat') assert(~isempty(ii))

Error using save Must be a string scalar or character vector. Error in savevar (line 2) save('a.mat',a) Error in Test1 (line 2) savevar(a)

2   Fail
clear load a assert(a==1)

Error using load Unable to read file 'a'. No such file or directory. Error in Test2 (line 2) load a