How can I build int64 values ​​in matlab?

I am trying to build a set of int64 numbers in Matlab R2013a.

An example of what I'm trying to achieve is shown below:

array_of_longs = [13286492335502040542 13286492335502040923 13286492335502042285 13286492335502042469 13286492335502042826 13286492335502044792 13286492335502045012 13286492335502046097 13286492335502047200 13286492335502049511 13286492335502050256 13286492335502050559 13286492335502053284 13286492335502055890 13286492335502056026 13286492335502057640];
horizontal_axis = 1:16;
f = figure;
plot(horizontal_axis,array_of_longs,'x')

Unfortunately, all x on the graph appear to be in a straight horizontal line, although the values ​​are different. I could not β€œenlarge” the y axis to show the change.

Is there any trick or work around building 64-bit integers?

Also, due to budget constraints, I cannot access the toolbars.

Thanks for the help!

+4
source share
1 answer

, . uint64 int uint64. x-values. .

% array_of_longs = {large set of uint64 values}
unique_longs = unique(array_of_longs);
num_unique = length(unique_longs);
random_key = randi([1,num_unique*2],1,num_unique);
array_keys = ones(1,length(array_of_longs));
for i=1:length(array_of_longs)
    array_keys(i) = random_key(find(unique_longs == array_of_longs(i)));
end

f = figure;
plot(x_values,array_keys,'x');

, uint64 . .

0

Source: https://habr.com/ru/post/1622671/


All Articles