Hi @Nick,
My understanding of your problem is that you want to make the "ricianchan" function execute with dynamic input which is generated by converting the text into 14 bits per character and then modulated using "bpskModulator". I have tried to achieve this by using a dynamic string "s" changing it to a 14 bits per character array, passing it to the "bpskModulator" and then running the function "ricianchan". The function does work without any issues with dynamic input length. As you can observe with the code below.
s='abcdefgh'
p=dec2bin(double(s),14)'
out=double(p(:))-48
pskModulator = comm.PSKModulator;
bpskModulator = comm.BPSKModulator;
%insig = randi([0,pskModulator.ModulationOrder-1],1024,1)
%data = randi([0 1],100,1);
%channelInput = pskModulator(insig);
modData = bpskModulator(out);
ricianchan = comm.RicianChannel( ...
'SampleRate',1e6, ...
'PathDelays',[0.0 0.5 1.2]*1e-6, ...
'AveragePathGains',[0.1 0.5 0.2], ...
'KFactor',2.8, ...
'DirectPathDopplerShift',5.0, ...
'DirectPathInitialPhase',0.5, ...
'MaximumDopplerShift',50, ...
'DopplerSpectrum',doppler('Bell', 8), ...
'RandomStream','mt19937ar with seed', ...
'Seed',73, ...
'PathGainsOutputPort',true);
[RicianChanOut1,RicianPathGains1] = ricianchan(modData)
release(ricianchan);
ricianchan.RandomStream = 'Global stream';
rng(73)
[RicianChanOut2,RicianPathGains2] = ricianchan(modData);
isequal(RicianChanOut1,RicianChanOut2)
I suggest you recheck your code as the function "ricianchan" has no issues with input of dynamic length.