Prev: load figure and then save with original figure's color??
Next: How to save a figure without displaying ?
From: Andre on 26 May 2010 04:40 Hello, I have built a Graphical User Interface (GUI) with Matlab. In this GUI a want to create a S-Function of a Silmulink Model. For this, I use the Real Time Workshsop and the command rtwbuild('Model/Subsystem')I have written the following code in a GUI Function set_param( 'model', 'RTWSystemTargetFile', 'rtwsfcn.tlc' ) set_param( 'model', 'RTWMakeCommand', 'make_rtw' ) set_param( 'model', 'RTWTemplateMakeFile', 'rtwsfcn_default_tmf' ) evalin( 'base','rtwbuild('model/Subsystem')' ); The Parameters for my Model are also in the base Workspace, so I use the command evalin() to run rtwbuild in the base Workspace. then the following error occured: Embedded MATLAB parsing for model "subsystem"...Done Embedded MATLAB code generation for model "subsystem".....Done Embedded MATLAB compilation for model "subsystem"... 1 Datei(en) kopiert. Done ??? Undefined function or variable "ind". Error in ==> C:\Program Files\MATLAB71\toolbox\rtw\rtw\private\ssgencode.p>LocalRetrieveThisUserData at 839 Error in ==> C:\Program Files\MATLAB71\toolbox\rtw\rtw\private\ssgencode.p>ssgencode at 102 Error in ==> C:\Program Files\MATLAB71\toolbox\rtw\rtw\rtwprivate.p>rtwprivate at 12 [varargout{1:nargout}] = feval(function_name, varargin{1:end}); Error in ==> C:\Program Files\MATLAB71\toolbox\rtw\rtw\rtwbuild.p>rtwbuild at 39 rtwprivate('ssgencode', 'Build'); In the Simulink Model and in the Gui I did not have a variable called 'ind'. Have anyone an idea how to solve the Problem? Or is there any other solution to create a S-Function in a GUI? (I use the Matlab version 7.1) with best regards Andre |