MATLAB - File I/O
What will be the output of the following MATLAB code?
x = 5; y = 10; save('test.mat', 'x'); clear; load('test.mat'); disp(y);x = 5; y = 10; save('test.mat', 'x'); clear; load('test.mat'); disp(y);x is saved. The clear command removes all variables from workspace.x, not yx exists. y is undefined, so disp(y) causes an error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions