Hello i'm getting this error...can any one help me out?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prudhvi Muppalla
am 23 Nov. 2014
Kommentiert: Star Strider
am 24 Nov. 2014
Error using reshape; Size arguments must be real integers.
Error in Channel_behaviour (line 7); xsym = bin2dec(reshape(x,k,length(x)/k).','left-msb');% Convert the bits in x into k-bit symbols.
This is my code:
0 Kommentare
Akzeptierte Antwort
Star Strider
am 23 Nov. 2014
There is actually nothing to reshape anyway. Two of the reshape arguments are scalars (specifically ‘n’=256 and ‘k’=4, and since length(x)=1, the last size argument is going to be length(x)/k=1/4 which is not an acceptable size for a matrix or array.
I’m not really certain what you’re doing, but you might want to revise the documentation on randi. I believe you were expecting ‘x’ to be a vector.
2 Kommentare
Star Strider
am 24 Nov. 2014
The randi function will work, and do exactly what you want it to do. You just have to tell it. If you want a vector of 20 digits from 0-9, ‘x’ becomes:
x = randi([0 9],1,20);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!