From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-07-2019 03:50 AM - edited 05-07-2019 03:55 AM
Could someone guide me how to return struct from MathScript node if I have something like this in it:
[stat.mymax, stat.mymin] = mymaxmin(1, 2)
The script looks like this:
function [mymax, mymin] = mymaxmin(a,b) %max min mymax = max(a,b); mymin = min(a,b); end
And the code:
Solved! Go to Solution.
05-07-2019 05:06 AM
It seems that output will not be automatically assigned because mymaxmin function is included in run time with addpath function...
05-09-2019 01:18 AM
To close the subject:
To be able to automatically assign output structure in a custom function I needed to set MathSript Search Paths: Tools > Options >MathScript > Search Paths.
From my understanding, it will never work with addpath() and in such case, I need to manually assign output data types (and I believe struct will not be an option).
Case closed.