i've already asked this question, but unfortunately no applicable answer
was available.
The problem:
I have a frame-based column vector with unknown size and want to reshape
it to a [4, ??] matrix. The available reshape block has no inputports
for its parameters but just a mask. So i have no chance to give him the
size of the vector dynamically.
Does anybody has an idea how to solve this problem?
Thanks for all help
Th. Vogel
I am not a Simulink person, but I imagine you could probably call the Matlab
function RESHAPE with an empty matrix for the unknown size:
y = reshape(x, 4, []);
Jordan
Thomas Vogel wrote:
--
Jordan Rosenthal
MIT Lincoln Labs
j...@ll.mit.edu
> Thomas,
>
> I am not a Simulink person, but I imagine you could probably call the Matlab
> function RESHAPE with an empty matrix for the unknown size:
>
> y = reshape(x, 4, []);
>
> Jordan
>
Hi Jordan,
thanks for your help.
Unfortunately with this settings i get just a vector with the size of 4.
I also tried to use [4, -1] but the block does not accept it.
Any other hints?
Th. Vogel
I'm not sure about the implications of "framebased but how about a
function call block to either <reshape> itself or to
<set_param> to change the mask parameter?
hth
Thomas
citation:
A frame of data is a collection of sequential samples from a single
channel. In Simulink, a length-M frame of data is represented by an
M-by-1 matrix (column vector). A multichannel signal with N channels and
M samples per frame is represented as an M-by-N matrix.
The problem is the dynamic structure of the model. The size of the
column vector changes every time, so i can not use any static settings
like set_param. Either the block has an input that gets the size of
frame by another block or the block itself has to support dynamic
parameters.
And so i need just another idea.
Th. Vogel
Hi Thomas,
Perhaps you could use a fixed-length column vector signal of the maximum
size that you would need (combined with a control signal that tells the
downstream block how many of the samples in the vector are "valid" samples).
Just a thought.
hth,
Steve
Thanks for your idea, but it is not usable. I want to simulate a
wireless network where the receiver knows nothing (except the basics)
about the transmitter. And while the transmitter transmits the whole
frame it is not able to receive a "acknowledge" frame from the receiver,
which makes the whole network extremly slow.
And so i hope for another idea :-)
Thanks
Th. Vogel