Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.4K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Component arrays in Diagram View

POSTED BY: Eric Smith
3 Replies
POSTED BY: Neil Singer

Eric,

As mentioned in your other post (resizing arrays) when you make a Class an array, the parameters must be entered as arrays in the form {1,2,3,4,5} (for a one dimensional array). See the model attached to that post to see an example (including setting the parameters from Mathematica)

Regards

POSTED BY: Neil Singer

Neil,

Thanks for the reply. I found my error. By setting the parameters of the component array with a local variable array, I overrode SystemModeler's GUI features. In other words, by trying to work around what I thought was a shortcoming just prevented me from seeing the shortcoming never existed :(

So I had

subComponent[n] componentArray(param = localParamArray)
parameter Real[n] localParamArray

which was completely unnecessary. All I needed was

subComponent[n] componentArray

This is kind of embarrassing and apologize for taking up space on the forums with a noob question. But thanks again for taking the time to respond!

POSTED BY: Eric Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard