im = readSPIDERfile('img001.dat');
imshow(mat2gray(im));
pause(2);
close
s = readSPIDERfile('stk001.hcc');
t = mat2gray(s);
[ix iy iz] = size(t);
montage(reshape(t, [ix,iy,1,iz]));
pause(2);
close
v = readSPIDERfile('vol001.hcc');
[ix iy iz] = size(v);
k = round(ix/2);
imx = squeeze(v(k,:,:));
imy = squeeze(v(:,k,:));
imz = squeeze(v(:,:,k));
subplot(1,3,1), subimage(mat2gray(imx))
subplot(1,3,2), subimage(mat2gray(imy))
subplot(1,3,3), subimage(mat2gray(imz))
pause(2);
close
C = cat(3,imx,imy,imz);
writeSPIDERfile('mystack.dat', C, 'stack')
disp('data written to mystack.dat')
h = slice(double(v),k,k,k);
set(h,'FaceColor','interp','EdgeColor','none')
colormap gray
pause(3)
close
docfile = 'doc001.txt';
disp(sprintf('The contents of %s:', docfile))
type(docfile)
q = readSPIDERdoc(docfile)
x = q(:,1);
y1 = q(:,2);
y2 = q(:,3);
plot(x,y1,x,y2)
pause(2)
close
c1 = [1:10]
c2 = [1:10:100]
b2 = [c1' c2'];
outdoc = 'newdoc.txt';
writeSPIDERdoc(outdoc, b2, {'ones'; 'tens'});
disp(sprintf('data written to %s', outdoc))
type(outdoc)
data written to mystack.dat
The contents of doc001.txt:
;spl/txt 01-FEB-2009 AT 12:46:13 doc001.txt
; / micros defocus astig
1 3 1 36797 88.661
2 3 7 31989 -77.546
3 3 14 23748 53.213
4 3 16 21499 -74.223
5 3 27 14098 33.008
q =
1.0e+004 *
0.0001 3.6797 0.0089
0.0007 3.1989 -0.0078
0.0014 2.3748 0.0053
0.0016 2.1499 -0.0074
0.0027 1.4098 0.0033
c1 =
Columns 1 through 9
1 2 3 4 5 6 7 8 9
Column 10
10
c2 =
Columns 1 through 9
1 11 21 31 41 51 61 71 81
Column 10
91
data written to newdoc.txt
;mat/txt 05-Feb-2009 AT 11:13:57 newdoc.txt
; / ones tens
1 2 1 1
2 2 2 11
3 2 3 21
4 2 4 31
5 2 5 41
6 2 6 51
7 2 7 61
8 2 8 71
9 2 9 81
10 2 10 91