I am a little confused by what you wrote, so I may not answer your real question:
The Matlab documentation contains clear instructions for using the Matlab mechanism from C programs. Since Objective-C is just C with buttons, I see no reason why you shouldn't call the engine from Objective-C. Everything that the Matlab engine sees when it is running is a valid call, it does not know what language the calling program is written in.
I think mcc does not matter for your use; you need an Objective-C compiler on your Mac. Matlab documentation assumes that a compiler included in Xcode prior to version 4.1 is suitable for Matlab-enabled applications. In my experience, it may take a little work with the compiler options to make a more recent compiler with your Matlab installation, but nothing more.
If you plan on using the Objective-C Matlab call, you might not want to start by writing M files for your algorithmic kernel. Actually, you probably will, but the Matlab mechanism doesnโt really run M files, it executes the commands sent to it by an external program, for example, your Objective-C program. Your development path can be (1) write an M file to implement the algorithm, then (2) write an Objective-C program that calls the Matlab mechanism at critical stages when the Matlab function is required. You can write your application to make the engine run the M file (I think), but this does not match my experience.
While you can use Matlab to run the compiler to create your programs, in this case you are probably better off using Xcode (or your preferred Mac IDE) to create your programs, making sure that the correct connections are made with the Matlab Engine . Again, the documentation explains what you need to do.
No wrappers. No M files. And good luck getting the Matlab engine running on iOS!
source share