どうすればprecisionを定数で指定してfreadを実行することができますか?
Ältere Kommentare anzeigen
MATLAB Coderを使ってコードをC++に変換したいと思っています.
その途中でエラーが出て,「コード内のfreadへの入力が定数ではない」という旨が表示されました.
おそらく,数値の読み取り方の指定であるprecisionが問題だと考えています.
コードでは,
PointCloudData = fread(fp, [numFields npoints], format);
と入力しています.このformatは'*float32'なのですが,これをどうすれば定数として入力できるでしょうか.
自分で調べてclassdefのページ(https://jp.mathworks.com/help/matlab/matlab_oop/properties-with-constant-values.html)も見てみましたが,使い方がよくわかりませんでした.
よろしくお願いいたします.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!