Thread Subject: Simulink -- matrix read and write

Subject: Simulink -- matrix read and write

From: Shota

Date: 25 Nov, 2009 21:43:20

Message: 1 of 1

Hi. I would like to do the followings in Simulink, but I don't know how to.

Here is what I need to do.

1. I'd lke to have a matrix (of size let's say 10 by 10) defined in workspace. I know I can manually type a matrix in workspace. But I want Simulink to do it automatically.

2. I'd like to update one of the entries of the matrix during a simulation run.
   The entry I need to update changes during simulation.

   For example, at some point of simulation, I want to update the entry at 1st column and 3rd row. But maybe later, I want to change the update the entry at 2nd column and 4th row. And even later times, I need to update some other entry.

In other words, the entry I need to change keeps on changing during a simulation.

3. To update an entry, Simulink needs to know (import) the current value of the entry. i.e. The new value of an entry is calculated using the current value of that entry.

To import a value from workspace to Simulink, what can I use?? The difficulty is that f the entry I need to import changes during a simulation.. (because the entry I am updating changes during a simulation)

I'd greatly appreciate your help and time.

 

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
workspace Shota 25 Nov, 2009 20:52:40
matrix Shota 25 Nov, 2009 20:52:35
simulink Shota 25 Nov, 2009 20:52:26
rssFeed for this Thread

Contact us at files@mathworks.com