Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use "From Workspace Block" in Simulink???

Status
Not open for further replies.

Luckybuilding

Member level 1
Joined
Oct 8, 2005
Messages
40
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,615
Hi, all
I have problem on using "From Workspace" Block of Matlab simulink.
When I use it in a model file. it gives me error.

I want to import an array of signal data ( in time domain) to a model.

Can anyone help me using this block of simulink?

Please, give me a sample model using this block if it is possible.

Thanks
 

Re: How to use "From Workspace Block" in Simulink?

Hi, you should create a structure or a matrix following the format that the block needs.

The format required for a matrix is var = [TimeValues DataValues], a simple code to implement this in matlab script is:

time = 1:0.1:2*pi;
data = sin(time);
VAR = [time; data]'

After that, you set the parameter 'Data' of the "From Workspace" equals to VAR. Similar procedure can be done to create a structure.
 
worked well.
thanks very much.

should I change time settings of the model file or not??
 

Re: How to use "From Workspace Block" in Simulink?

Hi,

The sample time of the block should be the same time used in the data input, 0.1 in the previous example (time = 1:0.1:2*pi;)

The time configuration for the simulation could be changed too, but generally I setup it as "auto".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top