ERROR: Python in Simulink: Class mismatch for variable 'commandOut'. Expected 'double', Actual 'char'.
3 次查看(过去 30 天)
显示 更早的评论
I get an error while Running a Python Script in a Simulink Model
function y = Test_1(a,k)
coder.extrinsic('tic','toc', 'system','clear' ,'clc','num2str' );
commandStr = ['C:\LegacyApp\Python27\python sqd.py ',num2str(a),' ',num2str(k)];
[status, commandOut] = system(commandStr);
y = coder.nullcopy(zeros(size(a),'double'));
y=commandOut;
This is the Error which i got during compilation:
Class mismatch for variable 'commandOut'. Expected 'double', Actual 'char' .
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!