How do create dynamic bash script for raspberry pi 4 in matlab

Hi
I have a script on raspberry pi 4 that takes three variables. These variables are generated by matlab and I need to run this script for it. The problem is that every time I try to generate this bash command, I get an error. I'm currently using Matlab Support Package for Raspberry Pi Hardware
Is it possible to do what I'm thinking? How can I do it?
Here's my trial and error returned.
Attempt 1:
comando = convertStringsToChars(strcat(['python Desktop/R3D5/motor.py '], [' '], [ang], [' '], [dir]));
system(raspi, comando)
Error:
Error executing command "python Desktop/R3D5/motor.py 100 1". Details:
STDERR: File "Desktop/R3D5/motor.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file Desktop/R3D5/motor.py on line 1, but no encoding declared; see
http://python.org/dev/peps/pep-0263/ for details
STDOUT:
Error in R3D5_main (line 31)
R3D5.moveBase(' 100', ' 1');
Attempt 2:
system(raspi, 'python Desktop/R3D5/base.py '+ ang + ' ' + dir)
Error:
Arrays have incompatible sizes for this operation.
Error in R3D5/moveBase (line 49)
system(R3D5.r, 'python Desktop/R3D5/base.py '+ ang +' ' + dir)
Error in R3D5_main (line 31)
R3D5.moveBase('100', ' 1');
I really don't have any more ideas
Thanks in advance

Antworten (0)

Kategorien

Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021a

Gefragt:

am 13 Nov. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by