Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
howto: Calling MATLAB from C - returning values?

Subject: howto: Calling MATLAB from C - returning values?

From: Bruno

Date: 5 Apr, 2010 17:54:06

Message: 1 of 1

Hello,

suppose you have a C function like this:

cFunction ( )
{
...
system('MatlabCode');
...
}

MatlabCode is a deployment executable, built with Matlab's mcc.

How could one return values from MatlabCode( ) to the calling cFunction?

This in Matlab:
function x = MatlabCode( )
...


x=2
end

should work? Because it appears it's not.

Thanks,
Xezi

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us