Hi, I am pretty new to both Fortran and creating/using mex files. I created a simple Fortran 90 subroutine that takes a 2-dimensional array and creates a 3-dimensional array after doing some multiplication. I have tested it it in Fortran and it seems to work fine. I am now trying to create a mex file from it. However, when I try to create the mex file I get the following error:
A => mxGetPr(prhs(1)) 1 Error: Different types in pointer assignment at (1) timesmultmex.f90:35.2:
B => mxGetPr(plhs(1)) 1 Error: Different types in pointer assignment at (1)
mex: compile of ' "timesmultmex.f90"' failed.
Error using mex (line 206) Unable to complete successfully."
Can somebody please help me figure out what I have done wrong. I am hoping it is a pretty simple fix, but I am not quite sure. Unfortunately, there does not seem to be much documentation about using Fortran 90 in Matlab. If I have major mistakes, can you please point me to a good source of information to help me fix this. Thanks in advance.
The file I am using is called timesmultmex.f90 and I enter "mex timesmultmex.f90" into Matlab.