Matlab coder euclidean example fail in 2023a update 3 - workaround?

4 vues (au cours des 30 derniers jours)
Adam
Adam le 30 Juin 2023
Réponse apportée : Poorna le 30 Nov 2023
The coder euclidean example from
fails at the "check for run-time issues" stage (after clicking "check for issues") at
idx = ones(1,2);
with
"Overloading the method 'subsindex' is not supported for code generation."
Does anyone know a workaround?

Réponses (1)

Poorna
Poorna le 30 Nov 2023
Hi Adam,
I understand that you're encountering errors while attempting to generate the code for the MATLAB coder Euclidean example, despite following the documented workflow.
Like Cris LaPierre mentioned in the comments, I also couldn't replicate the error on MATLAB R2023a version. However, I do have a workaround that might help you.
You can try replacing the code that initializes the idx and distance variables with the following code:
idx = [1,1];
distance = [norm(x-cb(:,1)), norm(x-cb(:,1))];
I hope this solution works for you. If not, there might be an issue with the C compiler you have installed. In that case, consider reinstalling the compilers.
Hope this Helps!
Best regards,
Poorna.

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by