フィルターのクリア

sending data from matlab to 8051

1 回表示 (過去 30 日間)
anas qazaz
anas qazaz 2013 年 3 月 24 日
hi,all i have file.bin when i opened it in matlab will show matrix with values such that -30 -11.2 5 10 etc how i can send these data via serial port?is fwrite instruction useful?how plzzzzzzzzzz help with code

採用された回答

Walter Roberson
Walter Roberson 2013 年 3 月 24 日
bufsiz = 1024; %adjust at will
infid = fopen('file.bin');
while true
buffer = fread(infid, bufsiz, '*uint8');
if isempty(buffer); break; end
fwrite(s, buffer, 'uint8');
end
fclose(fid);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by