Code covered by the BSD License  

Highlights from
SMATLINK - Let Matlab Dance with Mathematica

image thumbnail

SMATLINK - Let Matlab Dance with Mathematica

by

 

04 Jul 2008 (Updated )

Matlab (Frontend) call Mathematica Kernel

SMAT_matlabcall_pre_process( input_num )
% /*M-FILE FUNCTION SMAT_MATLABCALL_PRE_PROCESS MMM SMATLINK */ %
% /*==================================================================================================
%  Simple MATlab and MAThematica LINK laboratory Toolbox for Matlab 7.x
%
%  Copyright 2009 The SxLAB Family - Yi Chen - leo.chen.yi@gmail.com
% ====================================================================================================
% File description:
%
%          Step 1 : set format to float , NOT 3.14e+00
%          Step 2 : convert number to string, e.g. 3.14 --> '3.14'
%          
%Exampe:
%
%  [ output_str ] = SMAT_matlabcall_pre_process( 3.14e+00 )
% 
% output_str =
% 
% 3.1400
%===================================================================================================
%  See Also:        
%                    
%                    SMAT_matlabcall_casetest.m  
%                    SMAT_matlabcall_demo_script.m
%===================================================================================================
% 
% 
%===================================================================================================
%Revision -
% Date         Name                    Description of Change
% 29-Jun-2008  Yi Chen                 Initial
%HISTORY$
%==================================================================================================*/

% SMAT_MATLABCALL_PRE_PROCESS Begin

function [ output_str ] = SMAT_matlabcall_pre_process( input_num )

%  Step 1 : set format to float , NOT 3.14e+00
SMAT_set_formate  = '%11.4f';

%  Step 2 : convert number to string, e.g. 3.14 --> '3.14'
% len = size( input_num, 2);

   
 output_str = num2str( input_num ,SMAT_set_formate );

% SMAT_MATLABCALL_PRE_PROCESS End

Contact us