There is a structure Meas
, which has a binary Signal named B_cal
having time and value as its Parameters with values being a <20583*1 double> Signal. I am using this Signal in simulink through the From Workspace block with [Meas.(Meas.time),Meas.value]
as the Parameter of the block. Now i Need to generate a new binary Signal which has only the first bit high(i.e. 1) and all other bits low. The Signal should be of the same dimensions as B_cal
as i Need to put both the signals in an OR gate
. I tried and created a vector in the Matlab Workspace :
Signal = Zeros(20583,1);
Signal(1) = 1;
And then I used a FromWorkspace block in Simulink and tried to Import this Signal by using Signal
as the block Parameter. But it ives an error that the dimensions should be that of a Matrix.
Could someone tell that how to solve the Problem. Or how can i create a new Structure with the same elements but the value Signal should be as needed i.e. 1st bit high and rest low.
Meas
signal, you want something like[Meas.(Meas.time) Signal]
. – Phil Goddard