How can I covert a Matlab struct 1x1 to C++ without an error?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Conrad
le 30 Oct 2012
0 votes
Catégories
En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!