Thread Subject: Simulink - "from workspace" double to int16

Subject: Simulink - "from workspace" double to int16

From: amit liron

Date: 26 Jan, 2012 19:49:10

Message: 1 of 5

Hi
I am using the source - "from workspace".
this source is a double varable or matrix (am I write ?)

I need to convert it to int16 (in order to insert this input into other simulink function)
How can I do it ?

Subject: Simulink - "from workspace" double to int16

From: Phil Goddard

Date: 26 Jan, 2012 20:33:09

Message: 2 of 5

Use the data type conversion block

http://www.mathworks.com/help/toolbox/simulink/slref/datatypeconversion.html

Phil.

Subject: Simulink - "from workspace" double to int16

From: amit liron

Date: 27 Jan, 2012 04:47:09

Message: 3 of 5

Thank's

I still have errors.

I want to use the block G711 and give it the input (pcm data) from the workspace.
I tried to convert the input (from workspace block) to the input of the G711 and I still cant run this app

I get this err msg:
"Invalid matrix-format variable specified as workspace input in 'G711/From Workspace'. The matrix must have two dimensions and at least two columns. Complex signals of any data type and non-double real signals must be in structure format. The first column must contain time values and the remaining columns the data values. Matrix values cannot be Inf or NaN."

Thank's again

Subject: Simulink - "from workspace" double to int16

From: Phil Goddard

Date: 27 Jan, 2012 04:58:10

Message: 4 of 5

... and the dimensions of the data/matrix you are trying to input is?

Phil.

Subject: Simulink - "from workspace" double to int16

From: amit liron

Date: 27 Jan, 2012 15:11:10

Message: 5 of 5

Ok, I fixed the dim , but I still cant get to my goal.

1. I want to take the block of G711 and it the input from workspace, is it possible ?
2. from my understanding I must give the G711 block a structure with time ?
    

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com