simulink Unsupported input format for From Workspace block uint64

Hi,
I have 64-bit unsigned integer input signal going through From Workspace and get this error simulink:
Unsupported input format for From Workspace block ... Available formats are double non-complex matrix, a structure with or without time, or a structure with MATLAB timeseries as leaf nodes. All formats require the data to be finite (not Inf or NaN).
None of the following worked for me (the actual data is no constant- this is just a simplified example):
simin = [(1:64)' uint64(1311768467463790329) * ones(64,1,'uint64')];
simin.time = [1:64]; simin.signals.values = uint64(1311768467463790329) * ones(65,1,'uint64'); simin.dimensions = 1;
data = uint64(1311768467463790329) * ones(64,1,'uint64'); simin = timeseries(data);
If the simin array is converted to double then simulink won't complain but the conversion alters the number:
>> format long
>> format hex
>> intmax('uint64');
>> uint64(1311768467463790329)
ans =
uint64
123456789abcdef9
>> uint64(double(uint64(1311768467463790329)))
ans =
uint64
123456789abcdf00
Thank you

Answers (0)

Asked:

on 27 May 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!