ERROR : "Expected a value representable in the C type 'int'. Found 108301 instead."
65 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm using MATLAB function blocks in Simulink. but there were some errors about data type. I can't understand the error messages. what made this error?
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170020/image.jpeg)
>>
5 Kommentare
Michal Semonský
am 4 Jul. 2020
Hi, Peter S,
the error could be in your variable ind data type - this should be set as integer type by using functions like ind=uint8(ind), uint16(), uint32(), ...depends on the maximal value which ind could be (for uint16 it is 65535). Variable AT-OnCmd seems like a matrix and the indexing variable should be always integer non-negative type.
Amir
am 25 Feb. 2024
I have had the same problem in simulink recently. The error is due to indexing an array with a variable that isn't an intiger. For example, you may have used Tau_Plaus = tk(j+1) in one of your blocks where j is 1.00000. I would fix this problem by using tk(round(j+1)).
Antworten (1)
Andrew Sol
am 1 Mai 2019
You may try use block "Data Type Conversion", and convert input signal for MATLAB Fcn Block to uint8.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!