clear all;
clc;

%% I/O on file
% Storing on a file

% Save all the variables (workspace) on file
a = ones(3);
b = zeros(5);
c = [1 2 3 4];
save 'file_save_all.mat'

% Save only the specified variables on file
save 'file_save_a-b.mat' a b

% Save the variable (workspace) on an ASCII file
save 'file_save_c.txt' c -ASCII

% Free the workspace
clear all;
whos

% Load only a and b
load 'file_save_a-b.mat'

% Load the content of 'file_save_c.txt' in the variable "vect"
vect = load('file_save_c.txt')
