-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplot_testfunctions.m
More file actions
29 lines (26 loc) · 968 Bytes
/
plot_testfunctions.m
File metadata and controls
29 lines (26 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%%% plot orthonormal test functions. Requires V_cell, Vp_cell, tobs
inds=1:6;
toggle_savefig = 1;
for i=1:length(inds)
figure(i);clf
set(gcf,'position',[1500+floor(i/4)*1000 1200-325*(mod(i-1,3)+1) 687 213])
subplot(1,2,1)% plot tf
plot(V_cell{1}(i,:)/mean(diff(tobs)),'linewidth',3)
xlabel('timepoints')
xlim([1 length(tobs)])
ylim(max(max(Vp_cell{1}(inds,:)/mean(diff(tobs))))*[-1.5 1.5])
grid on
legend(strcat('\phi_{',num2str(inds(i)),'}'),'fontsize',12)
set(gca,'fontsize',12)
subplot(1,2,2)% plot tf deriv
plot(Vp_cell{1}(i,:)/mean(diff(tobs)),'linewidth',3)
xlabel('timepoints')
grid on
xlim([1 length(tobs)])
ylim(max(max(Vp_cell{1}(inds,:)/mean(diff(tobs))))*[-1.5 1.5])
legend(strcat('\phi^\prime_{',num2str(inds(i)),'}'),'fontsize',12)
set(gca,'fontsize',12)
if toggle_savefig
saveas(gcf,['~/Desktop/phi',strrep(num2str(inds(i)),' ',''),'.png'])
end
end