[simscape] how can I write a difference between output and input?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello all,
I've modelize a thermal component. my system put a heat flow Q at the node A. my component has to consume a part of this heat flow (Qcons) and i need to put out the rest of the heat flow at a node B.
the equation i want to put is B.Q == A.Q - Qcons
but i have an error :"Unexpected function or variable 'B'.
i have this in my variable: Q = { 0, 'J/s' };
and this in the fonction setup: through ( Q, A.Q, B.Q );
What can I do?
Thanks
2 comentarios
Babak
el 28 de Nov. de 2012
Please post all your code. The error says that you have not defined B before using it. So MATLAB doesn't recognize it!
Respuestas (1)
Babak
el 30 de Nov. de 2012
M = foundation.thermal.thermal;
M is defined as an element of a structure. The structure names are fixed. I don't know if your M is also by itself a structure or not. But if it is then it might have its subelements like M.a and M.b
In your code we don't see how the foundation structure is fully defined. If it has an element like foundation.thermal.thermal.Q then M.Q would be meaningful, but if foundation.thermal.thermal.Q is not defined then M.Q is not defined either.
Now, you cannot change Q before calling M.Q. If structure M has an element named Q, it is a fixed name and you cannot change Q to
Q = { 0, 'J/s' };
or this Q doesn't have anything to do with the Q in M.Q
0 comentarios
Ver también
Categorías
Más información sobre Foundation and Custom Domains en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!