matlab调用exe读取结果
时间: 2023-05-25 13:00:54 浏览: 285
要在Matlab中调用.exe文件读取结果,可以使用Matlab自带的system命令。具体步骤如下:
1. 在Matlab中使用system命令调用.exe文件。例如:system('myexe.exe')
2. 如果.exe文件有输出结果,可以将结果保存到一个变量中。例如:result = system('myexe.exe')
3. 如果结果需要以变量的形式传递给Matlab中的其他函数或脚本,可以使用Matlab的eval函数对结果进行操作。例如:eval(['myvar=' result ';'])
4. 如果结果需要以文件的形式保存,可以使用Matlab的文件输入输出函数。例如:fid = fopen('myresult.txt','w'); fprintf(fid,'%s',result); fclose(fid);
阅读全文
相关推荐

















