0

i had a code that c send back 1 number (mex) the matlab code was

vMsg=unit32(Gateway_test_app(2))

now i added 1 more return value to Gateway_test_app(2) which is s STRING what i need to do to get the two values back i was thinking about something like this:

[vMsg,errMsg]=??????(Gateway_test_app(2))

what should i put in the ????? place? thx for any help johnny.

ps using codegen and need not to get err when building

Ryan Livingston
  • 1,898
  • 12
  • 18
JohnnyF
  • 1,053
  • 4
  • 16
  • 31

1 Answers1

1

First call the function and store the two outputs, then run your extra function unit32 (what does it do, by the way?) on the first output only:

[vMsgOriginal, errMsg] = Gateway_test_app(2);
vMsg = unit32(vMsgOriginal);

This assumes that you don't want to process your new string output through your unit32 function.

Peter
  • 14,559
  • 35
  • 55