From: ptkwt@... (Phil Tomson) Date: 2006-02-02T07:21:00+09:00 Subject: Re: neuroimage software - scientific computing and visualization In article <1138790704.505109.135060@g44g2000cwa.googlegroups.com>, anne001 wrote: >I think you should stick with Matlab, they have developped programs for >years for this kind of work. The programs I have seen for MRI imaging >are in matlab. > >In ruby, there are things missing: ex when you do a sort, you don't get >the index of a sort as in matlab, only the sorted array. So you would >have to write you own - Matlab like - methods. I'm not sure I understand what you're saying here: are you saying you want the indices of the array sorted, but not the array itself? So are you saying that if you have an array like: a = ['d', 'b', 'a', 'c', 'e'] You would like to get something like: a.sort_index #=> [2, 1, 3, 0, 4] If that's the case, then I'm sure it's doable. No built-in method that I'm aware of, but you could easily create one. > >The other thing I miss in ruby, the ability to do matrix operations. If >you do the mean, it is the mean of a vector, while in matlab, you can >do a mean on any dimension array, indicating which dimension check out narray. > >I don't know how much stats ruby can do, certainly the matlab stat >package is not complete, but I can't imagine that a programming >language would be that developed in this area. > >Another reason to stay with matlab is readability. Matlab is a higher >level language. It sounds like you are a programmer selling a product, >so it might be different, but I work at a university, and students >inherit the matlab programs from one another, and then typically they >have to figure out what the program does to get the data in correctly >for their data, get the figures they want for their conditions... the >fact that it is written in a higher level language seems to help. YMMV. I don't find Matlab very readable. I much prefer Ruby's syntax. It's been mentioned before, but it would be cool to create a kind of MatLab 'replacement' using Ruby. One could imagine that you could take advantage of Ruby's metaprogramming and DSL abilities to create something that would be quite nice to use. (realistically, we couldn't completely replicate all matlab functionality, but perhaps we could focus on certain areas). MatLab may be 'higher level' but that's only in the sense of representing mathematical operations. In another sense Ruby is higher-level because it would allow you to create a DSL for representing mathematical operations (similar to MatLab). Phil