Error: block_diagram does not have a parameter named 'payloadMass'

5 visualizaciones (últimos 30 días)
Guanwei Zeng
Guanwei Zeng el 13 de Abr. de 2021
Respondida: Guanwei Zeng el 14 de Abr. de 2021
Hello
I have a model named ‘asbHybridAircraft4_7’, and I want to run it with the parameter 'payloadMass' configured with the sim fuction.
I used the following code
payloadMass=(tank_num*24+ha_i/34*1+160+loadMass)/0.454;
simout=sim('asbHybridAircraft4_7','payloadMass',payloadMass)
but an error occured
block_diagram does not have a parameter named 'payloadMass'
I'm very confused. Because the model dose have a parameter named 'payloadMass'.
Maybe it's not a parameter and just a variable. So I also tried
simout=sim('asbHybridAircraft4_7','WorkspacePayloadInLbm',payloadMass)
But the error occured again.
Could anyone tell me how to solve the error?
Thanks in advance.

Respuestas (1)

Guanwei Zeng
Guanwei Zeng el 14 de Abr. de 2021
I also tried the get(gcbh) function to see the parameter.
checkbox_payload_mass: 'on'
payload_mass_lbm: 'payloadMass'
And I changed the parameter name into 'payload_mass_lbm', but it didn't work.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by