フィルターのクリア

Conversion from Char array to unsigned int array

6 ビュー (過去 30 日間)
Hafiz Luqman
Hafiz Luqman 2018 年 3 月 28 日
回答済み: Walter Roberson 2018 年 3 月 28 日
I have an char array (fileNames_images)saving timestamps of sensor data..
fileNames_images (1,:) = '520944046594172889.png'
fileNames_images (2,:) = '520944046594172789.png'
...
..
..
I want to convert this character array into numeric array but matlab returns empty array.
camera_time = str2num( strcat('uint64(',fileNames_images(:,1:end-4),')') )
If I try to use loop;
for a = 1:1000
camera_time(a,:) = str2num( strcat('uint64(',fileNames_images(a,1:end-4),')') );
end
It says,
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-0

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 3 月 28 日
use sscanf with a %lu format

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by