How can I covert a Matlab struct 1x1 to C++ without an error?
Mostra commenti meno recenti
Hi,
I tried to generate C++ from Matlab with the Matlab coder. But I always got an error.
The error is:
>> coder -build test_struct.prj ??? This structure does not have a field 'fs'.
Error in ==> gen_strucht Line: 3 Column: 15 Code generation failed: Open error report.
Here is the Matlab-Code:
function [test_struct] = gen_strucht(test)
test_struct.x=test.fs;
test_struct.y=test.ts;
test_struct.a=test.modfac;
test_struct.q= test_struct.x * test_struct.a;
end
So what can I do?
Thanks for help.
Risposta accettata
Più risposte (1)
Conrad
il 30 Ott 2012
0 voti
Categorie
Scopri di più su MATLAB Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!