Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Some MATLABWindow tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
cstawarz committed Jul 15, 2010
1 parent 149f35e commit 2d3e982
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MATLABWindow/MATLABInterface.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Event de([event code],
}

// Convert and add to event list
insertDatumIntoEventList(mxGetField(data_struct, 0, ml_EVENTS), nread, datum);
insertDatumIntoEventList(events, nread, datum);


nread++;
Expand Down Expand Up @@ -177,10 +177,10 @@ - (void)runMatlabFile:(mxArray *)data_struct {
engPutVariable(e,
[ml_RETVAL cStringUsingEncoding:NSASCIIStringEncoding],
retval);
cmd = [NSString stringWithFormat:@"%@=%@(events,retval); ", ml_RETVAL, matlabFunction];
cmd = [NSString stringWithFormat:@"%@=%@(%s,%@); ", ml_RETVAL, matlabFunction, ml_EVENTS, ml_RETVAL];
mxDestroyArray(retval);
} else {
cmd = [NSString stringWithFormat:@"%@=%@(events); ", ml_RETVAL, matlabFunction];
cmd = [NSString stringWithFormat:@"%@=%@(%s); ", ml_RETVAL, matlabFunction, ml_EVENTS];
}
engPutVariable(e, ml_EVENTS, data_struct);

Expand Down Expand Up @@ -219,7 +219,7 @@ - (Engine *)getMATLABEngine {

if (!matlabEngine) {
[delegate appendLogText:@"** engOpen failed in starting Matlab\n"];
[delegate appendLogText:[NSString stringWithFormat:@"** command used was %s\n", MATLAB_APP_PATH]];
[delegate appendLogText:[NSString stringWithFormat:@"** command used was \"%@\"\n", matlabStartupCommand]];
} else {

engSetVisible(matlabEngine, 1);
Expand Down

0 comments on commit 2d3e982

Please sign in to comment.