Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab *.p file run from within R

Tags:

r

matlab

Using R.Matlab or another tool, is there a way to run a Matlab pre-parsed psuedocode file (*.p) from within R. All input data files accessed by this pre-parsed *.p are asci (.csv), located in the directory from which R would be started. There is also a fixed-name parameter file (text file) that is read or asked for.

like image 328
userNplus1 Avatar asked Jan 18 '23 12:01

userNplus1


2 Answers

This is not possible. MATLAB *.p files are encoded / encrypted files that can only be run in the MATLAB environment. There is also no way to convert them back to a regular MATLAB file (*.m). Not sure where you got the name: "pre-parsed psuedocode file" from, a *.p file is formally called a "protected function file".

like image 117
eternaln00b Avatar answered Jan 20 '23 01:01

eternaln00b


You might have some options if you have access to matlab.

  1. If you got matlab on your machine you could use the COM interface to start the p-file in matlab and then obtain the results.
  2. If you got access on a remote machine. It seems with codegen you can create c code from the p file. Suppose you can even build a library using mbuild. these should run flawless.
like image 39
bdecaf Avatar answered Jan 20 '23 03:01

bdecaf