검색어 입력폼

[공학용 계산]매틀랩(Matlab)에서 발생되는 여러 문제점과 답변

저작시기 2001.04 |등록일 2006.05.10 한글파일한컴오피스 (hwp) | 15페이지 | 가격 500원

소개글

매틀랩(Matlab)에서 발생되는 여러 문제점과 답변

목차

없음

본문내용

Problem Description
Why do my figures not stay open very long when using ActiveX with Visual Basic?

I am using ActiveX with Visual Basic. When I use the line indicated on page 5-9 of the API Guide (Result=Matlab.Execute("surf(peaks)")), the command is apparently executed but the figure (surf(peaks)) only appears a few seconds and then disappears.

Solution:
The figure is disappearing because the MATLAB object variable is local to the Visual Basic subroutine (Dim MATLAB as Object). When the subroutine exits, Visual Basic cleans up the variable, including releasing the object (MATLAB) which is associated with the variable. If you want to have the connection remain active longer than the duration of the subroutine call, you need to make the variable global. We recommend that you read the Visual Basic manual for more information concerning creating global variables with Visual Basic and ActiveX.

MATLAB Runtime Server
Adapting the Design for Runtime Execution

Two aspects of this example make it suitable for runtime execution:

The way its front-end GUI design passes information among the user, the Visual Basic portion, and the MATLAB portion
The way its top-level M-file passes information between the Visual Basic portion and the rest of the MATLAB portion
This section describes each of these two aspects in turn.

The Front-End GUI

This example is a simple GUI-driven application that evaluates and plots a MATLAB expression. Its GUI is shown below.

참고 자료

없음
다운로드 맨위로