由买买提看人间百态

topics

全部话题 - 话题: perl2
(共0页)
f******e
发帖数: 921
1
来自主题: CS版 - question help!!
I have a perl code, suppose the code file is "H.bg", I will run the code
like this way: ../Perl2/BNG2.pl H.bg, then it will output a data file
called: H.data.
Since I want to run it 10 times automatically and take one row of data
out. So, I want to use Matlab to implement it,
for i=1:10
../Perl2/BNG2.pl H.bg
fid=fopen('H.data','r');
a = fscanf (fid, '%f');
A(i)=a(size(a)-4:size(a));
clear a;
end
when I run, it said wrong in 2nd row. Could someone help me? I am not good
at Matlab.Thanks
f******e
发帖数: 921
2
来自主题: Programming版 - Perl and Matlab Question
I have a perl code, suppose the code file is "H.bg", I will run the code
like this way: ../Perl2/BNG2.pl H.bg, then it will output a data file
called: H.data.
Since I want to run it 10 times automatically and take one row of data
out. So, I want to use Matlab to implement it,
for i=1:10
../Perl2/BNG2.pl H.bg
fid=fopen('H.data','r');
a = fscanf (fid, '%f');
A(i)=a(size(a)-4:size(a));
clear a;
end
when I run, it said wrong in 2nd row. Could someone help me? I am not good
at Matlab.Thanks
(共0页)