声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1135|回复: 1

[编程技巧] 请问 engEvalString(ep, strEval) 是什么意思

[复制链接]
发表于 2008-1-10 21:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
  1. CString strEval;
  2. char buffer[20];
  3. strEval="i=";
  4. strEval+=itoa(I,buffer,10);
  5. strEval+=";";
  6. engEvalString(ep, strEval);
  7. strEval="k=";
  8. strEval+=itoa(K,buffer,10);
  9. strEval+=";";
  10. engEvalString(ep, strEval);   
  11. engEvalString(ep, "cd F:\\lxq1225");
  12. engEvalString(ep, "[re2,re3,re4]=matr(Mass,Stiff,i,k);"); //i think it is a function
复制代码

请问 engEvalString(ep, strEval); 是什么意思,因为 strEval是一个变量 而不是命令 所以请各位指教。:@L
回复
分享到:

使用道具 举报

发表于 2008-1-11 18:34 | 显示全部楼层
doc engEvalString:


engEvalString


Evaluate expression in string

C Syntax

#include "engine.h"
int engEvalString(Engine *ep, const char *string);



Arguments


ep
   Engine pointer.

string
   String to execute.

Description


engEvalString evaluates the expression contained in string for the MATLAB engine session, ep, previously started by engOpen. It returns a nonzero value if the MATLAB session is no longer running, and zero otherwise.

On UNIX systems, engEvalString sends commands to MATLAB by writing down a pipe connected to the MATLAB stdin. Any output resulting from the command that ordinarily appears on the screen is read back from stdout into the buffer defined by engOutputBuffer. To turn off output buffering, use
engOutputBuffer(ep, NULL, 0);



Under Windows on a PC, engEvalString communicates with MATLAB using a Component Object Model (COM) interface.

评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-12 07:16 , Processed in 0.077661 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表