How to define a "short" variable in MATLAB ?
Afficher commentaires plus anciens
Dear MATLAB Community,
I created a WebService with MATLAB. Now I want to run a specific function but this funtion strongly needs a data type "short". Parallel to MATLAB I created the same WebService and the same function in C# and there the function runs perfectly.
string elementName = "EL53";
string elementTypeName = "Line";
short portNr1 = 0;
bool isConnected = true;
client.SwitchElementAtPort(project, elementName, elementTypeName, portNr1, isConnected);
Above you can see the function in C#. Now my question is how can i create such a data type in MATLAB. I know that the data type "short" usually doenst exists in MATLAB and that it is equivalent to "int16()", so I tried this (see below), but sadly that didnt work.
portNr1 = int16(0)
Is there some kind of .dll I have to include to create a "short" variable ? What kind of possibilities do I have ?
Thanks in advance!! I am very grateful for any kind of help!! :)
2 commentaires
Rik
le 2 Août 2018
What is the Matlab code you're trying to run? 'it doesn't work' is too little detail to help you effectively.
OCDER
le 2 Août 2018
Did you mean you CAN make an int16 number in matlab, but it fails when passing this to another function that requires short? Can we see THAT part, where you're passing in this argument to the function that's failing?
Réponse acceptée
Plus de réponses (1)
Andre Becker
le 3 Août 2018
Catégories
En savoir plus sur Performance and Memory dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!