Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Use of DPOSV function from Fortran
Date: Thu, 11 Sep 2008 20:49:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 59
Message-ID: <gac07u$2va$1@fred.mathworks.com>
References: <gabg0h$l3a$1@fred.mathworks.com> <gabok6$2d2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1221166142 3050 172.30.248.35 (11 Sep 2008 20:49:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 11 Sep 2008 20:49:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1403623
Xref: news.mathworks.com comp.soft-sys.matlab:489876



Hello James,

Thank you so much for the help. Actually you got me right...I had the fortran program, I converted it but it gives an error that 'undefined function - dposv'.

I am new to Matlab so can u elaborate more on that. I tried to run 'mex lapack.c' in Matlab (in windows) as he mentioned but it gives me an error again - 
'??? Error using ==> mex
Unable to complete successfully'.

I understood that we need to pass no of arguments as many they are in original function.
dot = lapack('Z=ZDOTC(i,z,i,z,i)', length(x), x, 1, y, 1);
Now, i,z are just undefiend varibales, right? I mean they first i=length(x), z =x,.... right?

I have original dposv function like this:
dposv('A',6,1,a,6,b,12,c);
Now, I want it to work with Matlab. :(

Thanks again...
-Pam



"James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in 
message <gabok6$2d2$1@fred.mathworks.com>...
> "Sneha " <smithpamola@yahoo.com> wrote in message <gabg0h$l3a$1@fred.mathworks.com>...
> > Hello,
> > 
> > I have a function - 'dposv'  in fortran to be converted into Matlab. As I have read, we can use LAPACK functions but its giving an error- Undefined command/function 'dposv'.
> > 
> > Can anyone help me out?
> > 
> > It will be great help.
> > 
> > Thanks...
> 
> Not sure what you are doing. Are you:
> 
> 1) Taking Fortran code and converting it into MATLAB code (i.e., converting a ___.for file into a brand new m-file line by line
> 
> or
> 
> 2) Trying to create a mex routine from the Fortran file ... i.e. call the Fortran routine from MATLAB.
> 
> or
> 
> 3) Just trying to call an LAPACK or BLAS routine directly from MATLAB.
> 
> It almost sounds like you have converted Fortran code to an m-file and now want to resolve the dposv call from within the m-file. Is this correct?
> 
> If you want to call an LAPACK or BLAS routine from within an m-file, there are solutions for you on the FEX. Simply go here
> 
> http://www.mathworks.com/matlabcentral/fileexchange/loadFileList.do
> 
> and search for LAPACK or BLAS and you will see some solutions that may work for you. I haven't tried them all, but I have tried this one by Tim Toolan and it seems to work OK:
> 
> http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16777&objectType=file
> 
> James Tursa
>