Code generation does not support changing types through assignment
69 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hello
i hope you all help me in this matter as am stuck for days now .
i have simulink file which have a matlab code that process received frames of data and rebuild the image that has been transferred. Once the appropriate number of frames has been retrieved, the image is then plotted in a figure for the user to observe.
- the simulink file works perfectly in MATLAB 2014b, now i am using Matlab 2016a and shows me error!!!*
In that code, i think i have problem with one of the functions that call a file named bi2de.m.
the function is
it gives me this error "This assignment writes a 'uint16' value into a 'uint8' type. Code generation does not support changing types through assignment. Check preceding assignments or input type specifications for type mismatches." as seen here :
the MATLAB code is attached.
can anybody help me on this ?
regards
0 Kommentare
Antworten (1)
Ethem
am 31 Mai 2016
If your input to bi2de is an integer type, it tried to adjust the output type to make sure the the results fits in. For example, if the input is uint8, and the binary conversion generates a decimal number that is greater than 255 (2^8-1), then the output data type becomes uint16 or unit32.
Make sure that the input data type to bi2de is big enough to hold the output numbers.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Communications Toolbox 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!