image thumbnail

EXPO 2011 Signal Processing Workflow Demo Files

by

 

MATLAB EXPO 2011 Signal Processing Workflow Demo Files

readwrite_mat.m
%%
clear all,  close all

%% create signal
A=sin(2*pi*0.01*[1:100]);
figure,plot(A)
%% save v-4 mat file
% MATLAB Ver1 - 4
% 2D doubleAAXp[Xz̃T|[g
save('data_v4.mat','A','-v4')
type data_v4.mat

%% save v-6 mat file
% MATLAB Ver5 - 6, MATLAB 5.0 MAT-file
% 񈳏kANzA\́AZ̃T|[g
save('data_v6.mat','A','-v6')
type data_v6.mat

%% save v-7 mat file ftHgݒ
% MATLAB Ver7.0 - 7.2, MATLAB 5.0 MAT-file
% f[^kAUnicode GR[fBÕT|[g
save('data_v7.mat','A','-v7')
type data_v7.mat

%% save v-7.3 mat file
% MATLAB Ver7.3(R2006b) - , MATLAB 7.3 MAT-file
% 2GB ȏ̃f[^ڂ̃T|[g
save('data_v73.mat','A','-v7.3')
type data_v73.mat

% newfile = matfile('data_v73_matfile.mat');
% type data_v73_matfile.mat

%% MATt@Cɒlj̕ϐۑ
% Vɕϐlj͏o邪Aϐ̒̃f[^lj邱Ƃ͕s
B = 2*A;
save('data_v7.mat','B','-append')

%% ljۑt@CǍ
clear all
load data_v7.mat


%% K̓f[^̍쐬
clear all

%% f[^쐬
dataleng = 4e5;
A2 = sin(2*pi*[1:1.5:30]'/1e5*[1:dataleng]);
size(A2)
tic
save('data_v73_partial.mat','A2','-v7.3')
toc
figure, plot(A2(1,:))
%% IɃf[^CWrite
io_exp = matfile('data_v73_partial.mat','Writable',true)
tic
io_exp.A2(1,dataleng/2:end) = 0.5*A2(1,dataleng/2:end);
toc
%% Sf[^ReadĊmF
clear all
tic
load data_v73_partial.mat
toc
hold on, plot(A2(1,:),'r')

%% IɃf[^Read
io_exp = matfile('data_v73_partial.mat')
tic
A2_partial = io_exp.A2(1,1:1e5/2);
toc

Contact us