Yup. Actually, the same reasoning has to do with why I've got a few relational databases implented as Excel spreadsheets linked with hlookup() and vlookup() functions instead of being in a proper RDBMS -- there were just enough things I wanted to do that Excel handled more easily than the database managers I had handy at the time I started keying data in. (And then I hit the things that Excel doesn't do well either, and write a mini-rantlet like the one above.) Eventually I'll write my own data entry/manipulation front end and make it talk to MySQL or Postgress or something so I can have the efficiency of a proper DBMS, the power of SQL queries, and the "doesn't piss Glenn off" factor of a comfortable and powerful user interface for the data entry. But that's been on my to-do list for a while now.
Is MATLAB a collection of small, powerful tools you can link together in the UNIX cli tradition, or a big do-everything tool whose user interface involves a whole lot of small, powerful commands you can link together or script conveniently?
Is MATLAB a collection of small, powerful tools you can link together in the UNIX cli tradition, or a big do-everything tool whose user interface involves a whole lot of small, powerful commands you can link together or script conveniently?
The latter. It's more a interpreter-based language than anything else, actually. Typical small MATLAB program (actually, excerpt from the grade processing program I have):
load gradelist a=gradelist;
% calculating totals for k=1:sno t=0; for l=1:qno if l==1 t=t+0.2*a(k,l); elseif l<=3 t=t+0.01*a(k,l); elseif l<=11 t=t+0.005*a(k,l); elseif l==12 t=t+a(k,l); else t=t+0.35*a(k,l); end end total(k)=t; end
%writing expanded matrix, including totals for k=1:sno a2(k,1:qno)=a(k,1:qno); a2(k,qno+1)=total(k); end
%create average and std vectors noans=a(sno+1,:); noans(qno+1)=sno-empty; for k=1:qno+1 x=a2(1:sno,k); ave(k)=sum(x)/noans(k); stds(k)=std(x); end
It reads very easily. It's based on C, and you can incorporate C programs into it. It's got tools for almost every numerical mathematics thing you might want to do, and extra toolboxes for control theory, image processing, signals/systems etc.
(no subject)
(no subject)
Is MATLAB a collection of small, powerful tools you can link together in the UNIX cli tradition, or a big do-everything tool whose user interface involves a whole lot of small, powerful commands you can link together or script conveniently?
(no subject)
The latter. It's more a interpreter-based language than anything else, actually. Typical small MATLAB program (actually, excerpt from the grade processing program I have):
load gradelist
a=gradelist;
% calculating totals
for k=1:sno
t=0;
for l=1:qno
if l==1 t=t+0.2*a(k,l);
elseif l<=3 t=t+0.01*a(k,l);
elseif l<=11 t=t+0.005*a(k,l);
elseif l==12 t=t+a(k,l);
else t=t+0.35*a(k,l);
end
end
total(k)=t;
end
%writing expanded matrix, including totals
for k=1:sno
a2(k,1:qno)=a(k,1:qno);
a2(k,qno+1)=total(k);
end
%create average and std vectors
noans=a(sno+1,:);
noans(qno+1)=sno-empty;
for k=1:qno+1
x=a2(1:sno,k);
ave(k)=sum(x)/noans(k);
stds(k)=std(x);
end
[snip writing results to file parts]
netgrades=a2(:,qno+1);
edges=[0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100];
[myhist,mybin]=histc(netgrades,edges);
figure(1)
clf
bar(edges,mhist3,'histc')
grid on
axis([1 100 0 20])
It reads very easily. It's based on C, and you can incorporate C programs into it. It's got tools for almost every numerical mathematics thing you might want to do, and extra toolboxes for control theory, image processing, signals/systems etc.