How can I p-code a function whose input parameter is of type struct?

5 visualizaciones (últimos 30 días)
Wiebke
Wiebke el 6 de Nov. de 2013
Respondida: Wiebke el 7 de Nov. de 2013
Dear all,
I need to p-code a certain function of my program which contains the main algorithm. The problem is that the input argument of the algorithm function is a structure called "guidata". When I try to p-code this function I, of course, get the following error message:
>> pcode(algorithm)
Reference to non-existent field 'signals'.
Error in algorithm (line xy)
algorithm.run.output = guidata.signals.level;
My question now is if there is any way p-coding this file without changing the structure or worse: using global variables!
Thanks in advance!
Regards, Wiebke

Respuestas (2)

Walter Roberson
Walter Roberson el 6 de Nov. de 2013
pcode('algorithm')
Notice it needs to be quoted.

Wiebke
Wiebke el 7 de Nov. de 2013
Ouh! Of course it works now.
Sometimes you to miss the forest for the trees ... Thank you!

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by