Display multiple causes of an error settings

Hello all,
What settings (and where) should I do for displaying the multiple causes of an error.
For example if I build a model and I miss some parameters (that I used in the model) in workspace how is possible to receive an error showing me all this parameters (at the same time) that I miss?
At the moment I receive an error for one parameter, then I save it, then I try to build the model again and I get another error with the next parameter that I forgot to save in workspace, and so on... I do not what this to happen.. it would be perfect to display the multiple causes of the error.
Thanks! Bye!

2 Commenti

Which Matlab/Simulink version you are using ?
I'm using the 2011b version.

Accedi per commentare.

Risposte (2)

I am also using same version and I can see all the missing parameters at one time. And I don't think that there is any special setting for that. See may error dialog:
You can try in another way also.
In command window enter command
>> get_param('YourModel','ReferencedWSVars')
This returns all the model parameters which are from workspace. And for missing parameters it give error listing all the missing parameters.
Alexandru
Alexandru il 12 Dic 2012
Hey,
While compiling the model I want to display all the errors (in one) via command line.

5 Commenti

TAB
TAB il 12 Dic 2012
Modificato: TAB il 12 Dic 2012
What do you mean by display all the errors (in one) ?
Isn't above function get_param('YourModel','ReferencedWSVars') do the same job.
I mean to see all the parameters that are missing in one error. See below an example (this is what I an trying to get in my command window):
Caused by:
Error using X (line 11)
Error due to multiple causes.
Error using X (line 11)
Error evaluating parameter 'Value' in 'Model/Constant'
Error using X (line 11)
Undefined function or variable 'Parameter1'.
Error using X (line 11)
Error evaluating parameter 'Value' in 'Model/Constant1'
Error using X (line 11)
Undefined function or variable 'Parameter2'.
Error using X (line 11)
Error evaluating parameter 'Value' in 'Model/Constant2'
Error using X (line 11)
Undefined function or variable 'Parameter3'.
Error using X (line 11)
Error evaluating parameter 'Value' in 'Model/Constant3'
Error using X (line 11)
Undefined function or variable 'Parameter4'.
From this single error I know that I have to load in workspace the 4 parameters: Parameter1, Parameter2, Parameter3 and Parameter4.
At the moment I receive first an error containing only the part related to Parameter1. I save this parameter in workspace, I compile again the model and I receive another error about only Parameter2 that I am missing, I save it I compile again and after that again I get an error about only Parameter3 and so on...
This is what i got using command
>> get_param('YourModel','ReferencedWSVars')
Use this command before you start the model compilation/simulation. I don't think you have even tried this.
Hey, First thank you for trying to help me.
I tried this command when you wrote me first above, but still I get the error only about the first parameter... I was thinking that it's about a Matlab setting about how to display an error..
I don't know what could be the reason. But you can go through command Simulink.findVars. It is used to trace the variables/parameters used in model. I have never used this in practice.
Below are the other links which explains its usage:

Accedi per commentare.

Categorie

Prodotti

Richiesto:

il 11 Dic 2012

Community Treasure Hunt

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

Start Hunting!

Translated by