LabJack
Mechanical
- Apr 27, 2005
- 1
I am creating a function that needs to have two ouputs but I can only get it to output one or the other and not both at the same time. Here is the function
function [ljError ljValue] = ljud_eGet(ljHandle, IOType, Channel, ljValue, x1);
[ljError ljValue] = calllib('labjackud','eGet',ljHandle,IOType,Channel,ljValue,x1);
with the mfile as above I get "ans = 0", which is correct for the ljError value. If I change the first part of the function to read "function [ljValue] = ......" then I get "ans = 4.67" which is also correct.
How can I change my function so that if outputs both? The preferred output would be "ans = 0 ans = 4.67".
function [ljError ljValue] = ljud_eGet(ljHandle, IOType, Channel, ljValue, x1);
[ljError ljValue] = calllib('labjackud','eGet',ljHandle,IOType,Channel,ljValue,x1);
with the mfile as above I get "ans = 0", which is correct for the ljError value. If I change the first part of the function to read "function [ljValue] = ......" then I get "ans = 4.67" which is also correct.
How can I change my function so that if outputs both? The preferred output would be "ans = 0 ans = 4.67".