I want to get started on scientific programming on the Mac using Objective-C. I am very familiar with MATLAB which makes it easy to store complex-valued waveform data in vectors and generating plots. I was wondering if there might be a good resource that might compare how you would implement common MATLAB operations (i.e. creating an array of complex values or generating a mesh plot) in an Objective-C/Cocoa environment.
-
$\begingroup$ You might want to take a look at interfacing with the Visualization ToolKit (VTK). macresearch.org/…. $\endgroup$– Allan P. Engsig-KarupCommented Dec 17, 2011 at 18:38
-
6$\begingroup$ Any particular reason you want to resign from the huge, powerful stack of cross-platform tools for a sake of using an esoteric language built exclusively for making GUIs and working only on a hardware that can't be reasonably used for any serious HPC? $\endgroup$– mbqCommented Dec 17, 2011 at 23:55
-
1$\begingroup$ @mbq Maybe to integrate well with an existing xGrid setup? $\endgroup$– FomiteCommented Dec 20, 2011 at 21:36
3 Answers
I don't know of any Objective-C-specific libraries or frameworks, but there are a large number of libraries written in and available for plain C, and you should be able to use them with Objective-C.
Using C allows you to use PETSc, gsl, LAPACK, and loads of other useful numerical libraries. I would advise against trying to code the matlab routines yourself. Internally, matlab likely uses well-known numerical libraries itself.
If you're looking for numerical libraries in an object-oriented language, you might want to look into using C++, which has Armadillo and Trilinos available.
if you are completely unfamiliar with C, but are using matlab as your base starting point, i would actually recommend fortran90 over C. the languages are so incredibly similar it is scary (as far as syntax goes at least)
You may want to look at this series of articles on scientific computing with Cocoa from MacResearch.