C Caller with Multidimensional Signals in Simulink

17 visualizzazioni (ultimi 30 giorni)
Jack Daniels
Jack Daniels il 4 Nov 2024 alle 11:38
Risposto: David Balbuena il 6 Nov 2024 alle 15:42
How to deal with multidimensional data inputing the C caller function?
How the argument of the C-function looks like where inutting vector of 3-elements ?
double myTEST(double *u){}
Error:Error in port widths or dimensions. 'Output Port 1' of 'Vec3' is a one dimensional vector with 3 elements.
Error in port widths or dimensions. 'Input Port 1' of 'myTEST' is a one dimensional vector with 1 elements.

Risposte (2)

Umang Pandey
Umang Pandey il 5 Nov 2024 alle 5:27
Hi Jack,
I recommend checking out the following MATLAB blog post titled "How to Correct Errors in Port Width or Dimension in Simulink," which specifically addresses the error you're encountering. It provides various debugging approaches and solutions:
Additionally, the following MATLAB answers might also be of help:
Best,
Umang

David Balbuena
David Balbuena il 6 Nov 2024 alle 15:42
You need to specify the dimension is "3" on the C Caller block:

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Tag

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by