Get value from function to be used in another program part 2
4 views (last 30 days)
monkey_matlab on 19 Oct 2016
I have this function
function [x y] = centroid(X)
X = X/sum(X(:));
centro = [dot(I(:),X(:)), dot(J(:),X(:))];
when I try to use this function call in another program to use the centro values, I get an error , "Output argument "x" (and maybe others) not assigned during call to "centroid"."
How can I use the data out from this function?
Here is my use case in another program:
A = centroid(X);
More Answers (1)
Mauricio Bassallo on 3 May 2021
I have a model created in Simulink (also with Simscape elements) and I want that some some outputs (ports) of the model be sent to another program, which is going to return inputs to the model (control the model) based on the outputs that was sent by the model.
Does anyone have some idea about how to create an interface between Simulink model and a program in order to generate such dynamic?
Thnaks in advance for your reply!