 
        0
    
    
    
        
        
        À l'étude
        
        
    
    
    
    
    
    It is possible to use mp computations in a simulink block or S-function ?
I would like a simulink block which have double precision floating point in input and output but internal computations in this block are made in quadruple precision: it is possible to use with MP Toolbox ?
Service d'assistance aux clients par UserEcho
 Questions
		
		
	
Questions 
	
 
                
This is definitely possible with usual MATLAB functions, e.g.:
function F = mpfun(x) x = mp(x) % convert input to 'mp' ... % compute F using 'mp' F = double(F) % return 'double' endS-function is complied MEX module and it cannot use "mp" objects directly in C/C++ code.
But you can put 'mp'-related code to separate MATLAB function (like above) and call it from within MEX/S-function using mexCallMATLABWithTrap or mexCallMATLAB.