Full Version: Cplua Project: LNA
Pages: 1, 2, 3, 4, 5
unique33
I try to download the dislin library but it does not work , any of the files in the mentioned site can not be downloaded .
May because of Ftp download .
does the downloads work properly ?
I want this one :
ftp://ftp.gwdg.de/pub/grafik/dislin/windows/dl_91_if.zip
edit : I finally downloaded the files .

Did you know?
Doug Currie has written an extension of Dislin for the programming language Lua. The extension is available from the site http://luaforge.net/projects/ldislin.
unique33
ok I installed the DISLIN library , but :
when I run the following test program I will recieve some errors

PROGRAM TEST
USE DISLIN
CALL DISINI ()
CALL MESSAG ('This is a test', 100, 100)
CALL DISFIN ()
END PROGRAM TEST

error:
error : unresolved external symbol _DISINI referenced in function _MAIN__
and the same error with the MESSAG and DISFIN and any other statements that I try.

it seems that the library is added to the project but the statements does not work!

can anyone help me ?
please illustrate How to add the environment variables to the win XP
I have added the variables to the Control Panel -> Sytem -> Advanced ->Environment variables , but I,m not so sure if it done properly .
Name :DISLIN
Value : C:dislin\win

I have tested the DISLIN for DIGITAL visual fortran 6 and
also with MS visual Studio 2005 with Intel visual fortran Compiler Pro 9.1
and I used the proper DISLIN library for each compiler .
but ...



PAP
QUOTE (unique33 @ Jan 20 2007, 12:23 AM) *
One of my friends gave me "Visual fortran compiler pro 9.1 with IMSL" as a gift . but It require "visual studio 2002 or 2003 ".
I wanna to know that if I provide the visual studio and if I install the fortran compiler , can I run and compile the Fortran 90 files through the visual studio ?
I can't answer your question, it's too Window$-related for me, and I don't use that virus pretending to be an "operating system". However, I have a recommandation. Why don't you try the Eclipse project callled Photran (sic)? It provides a powerful IDE, which is able to use virtually any Fortran compiler, plus it's free. It works fine even in Window$, it just need a recent Java Developement Kit (JDK), which is also free wink2.gif.

QUOTE (unique33 @ Jan 20 2007, 12:23 AM) *
Also I need a good book for Fortran Programming .Any recommendation ?
IMHO, the best book about pure Fortran 95 is this:
T. M. R. Ellis and Ivor R. Philips, Programming in F, Addison-Wesley 1998.
It teaches you how to write programs in "F", which is a subset of Fortran 95, where old, obsolete features are removed, and considered as syntax errors. As a result, using F, you must write structured, fully module-oriented programs. However, this also means that old (and well-working) codes you can find in the Internet won't work with an F compiler (well, they work, but not trivially). However, any F program works with any Fortran 95 compiler, so I suggest to learn F, even if you use a Fortran 90/95 compiler.
A best seller on Fortran Numerical Analysis programming is Numerical Recipes in Fortran 90 (the on-line PDF version is here). However, I don't really suggest that book. It contains a lot of ready-to-work libraries on many Numerical Analysis topics, but you can find much better libraries in the Internet sites I have posted recently. I know many people how are "stucked": they always use Numerical Recipes, so they are missing much more powerful algorithm implementations which can be easily found for free.
PAP
QUOTE (unique33 @ Jan 22 2007, 11:21 AM) *
Did you know?
Doug Currie has written an extension of Dislin for the programming language Lua. The extension is available from the site http://luaforge.net/projects/ldislin.
Nice to know, but, for god's sake, why do I need to use DISLIN with Lua in my PC?
In a real PC, Lua is good for writing World of Warcraft maps, and generally things like that. It is certainly a bad choice for numerical programming. On the other hand, in ClassPad, CPLua is an excellent choice for programming; in fact, CPLua is the only well-working choice, since the other option you have is to use... CPBasic.

QUOTE (unique33 @ Jan 23 2007, 12:03 AM) *
error : unresolved external symbol _DISINI referenced in function _MAIN__
This error message means that the compiler cannot find the DISLIN libraries. Are you sure you have installed DISLIN correctly? Try to add the DISLIN directory to the PATH. The last time I did that in Window$ is several years ago, but I think I remember well: in a command-line window, type
PATH=<your DISLIN path>;%PATH%
then start Fortran from the command line (you can just write a "batch" file doing all this).
unique33
I could compile the file.But :
I think I have some problems with the environment variables .
I think I can not define them in the win XP properly.
the statement you mention above is for win 98 , me .
for win xp I should use the control panel -> system -> environment variables:
here there is 2 parameter :
Variable Name ,Varable value
I choosed :Variable Name :DISLIN , Variable value : path for installation
but When I run the program ,
there is this error :"the application has failed to start because disdll.dll was not found . Re installing the application may fix the problem"
I copy, pasted the disdll.dll file to the "Windows\system32" Folder and the program run but without any output.
Just : "End of the DILIN 9.1 Library" will be printed on the screen.
For example :I tested the curve and surface Fortran 90 example code on the disline.de site but no curve will be ploted on the screen.

Debug Errors:'dislin2.exe': Loaded 'E:\Engineering Programs\Programming Projects\Fortran\Template\Template dislin\Template dislin 2\dislin2\Debug\dislin2.exe', Symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\disdll.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\lpk.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\wininet.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\urlmon.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'dislin2.exe': Loaded 'C:\WINDOWS\system32\psapi.dll', No symbols loaded.
The program '[1836] dislin2.exe: Native' has exited with code 0 (0x0).

PAP
QUOTE (unique33 @ Jan 23 2007, 10:47 PM) *
I could compile the file.But :
I think I have some problems with the environment variables .
I think I can not define them in the win XP properly.
the statement you mention above is for win 98 , me .
for win xp I should use the control panel -> system -> environment variables:
I'm afraid I can't help you. My GNU/Linux DISLIN library works without any problem. I have never installed the Window$ version...
unique33
I messaged Helmut Michels and he said that :
"Dislin creates by default a plotfile. If you want to plot to the screen,
you have to include the statement CALL METAFL('CONS') before DISINI."

and now the dislin works properly.
thanks to you and to Helmut Michels.
PAP
QUOTE (unique33 @ Jan 25 2007, 12:46 PM) *
and now the dislin works properly.
thanks to you and to Helmut Michels.
Welcome to the world of powerful Fortran programming smile.gif.
Behnoud
What is the newest LuaNum version?
Where is the latest version download link?
Btw, Is it an Open Source program?
I'm going to learn it within next week.
How can I found some training materials
(something like PowerPont presentation or ...) about it?
PAP
QUOTE (Behnoud @ Feb 23 2007, 12:10 AM) *
What is the newest LuaNum version?
LuaNumAn was renamed to LNA several months ago (topic's name is still LuaNumAn because I cannot change it (perharps a modulator can do that for me? [*]).
Anyway, LNA's latest version is 1.60, released June 12, 2006. Note that version 1.70 is almost ready, but I didn't released it yet, due to lack of time...
You will always find information about the latest version at LNA's initial post (here).

QUOTE (Behnoud @ Feb 23 2007, 12:10 AM) *
Where is the latest version download link?
Here is LNA 1.60 and here is its documentation.

QUOTE (Behnoud @ Feb 23 2007, 12:10 AM) *
Btw, Is it an Open Source program?
Yes, in terms of the GNU General Public License (GPL). If you plan to modify LNA's source code, you should first carefully read GPL (it is included in LNA's documentation).

QUOTE (Behnoud @ Feb 23 2007, 12:10 AM) *
I'm going to learn it within next week.
It's not difficult to learn LNA, but you will need to spare some of your free time. You need to know CPLua before starting. If you plan to learn LNA in one afternoon, you will be probably disappointed.

QUOTE (Behnoud @ Feb 23 2007, 12:10 AM) *
How can I found some training materials (something like PowerPoint presentation or ...) about it?
The documentation is the first place to go. Please read the documentation before doing anything else rtfm :r-t-f-m:.gif . It includes many explanations and examples. After that, the best "training material" is practicing. Practice makes perfect wink2.gif.
Btw, You will never find training material in PowerPoint presentation or Word document, at least not written by me. Reason: I don't like and I don't use Micro$oft products.

P.S. Maybe I need to add a "FAQ" in LNA's documentation.


[*] Topic's name changed to "Cplua Project: LNA"
BrainBurner
Hallo!

I'm writing a function for the QR decomposition but I think that my Idea has too many for loop!

Is there a quickly solution to compute a matrix operation like this (hous_mult is a function that return a (k-n)x(k-n)-Matrix):
CODE
A(k : n, k : n) = house_mult(A(k : n, k : n), v(k : n))


My idea is to use a fro loop to build A(k : n, k : n) with the function LNAutils/Part, save the result of house_mult in a temporary matrix and then copy it to my matrix A. Do you have an other idea?
PAP
I need more information concerning your house_mult function (what it does, and how it does it).
Btw, you can use LU decomposition instead of QR decomposition. LU decomposition is already implemented in LNA, and has been passed several tests succesfully.
girdeux
PAP: it's possible, maybe, add in LNAplot a funtion which would be possible draw logaritmic and semilogaritmic charts?
thanks
PAP
QUOTE (girdeux @ Jan 17 2008, 05:02 PM) *
PAP: it's possible, maybe, add in LNAplot a funtion which would be possible draw logaritmic and semilogaritmic charts?
Of course it is possible... but I don't think I will have the time to do it in the near future. Note that LNAplot already supports animated and windowed graphics, and vector plots. All that is implemented in LNA 1.70, but I haven't released that version yet, simply because I don't have time to write a decent documentation for the new features sad.gif
diiego06
Hi, first of all, thank you Orwell and PAP. CPLua AND LNA are the solution to my problems. biggrin.gif

PAP, I know that you are occupied, but, when will we be able to have the LNA 1.7 in our classpad's? The LNA 1.6 is very useful, I cannot wait to know what us brings the LNA 1.7

A suggestion: to improve the function MatPrint, since when the number of columns is too big, we cannot estimate the complete Matrix; if it is not possible to do in the window Console, a good idea would be to do it in a window created with UI package. yesnod.gif

PD: sorry for my poor English.
PAP
QUOTE (diiego06 @ Jun 7 2008, 06:03 PM) *
Hi, first of all, thank you Orwell and PAP. CPLua AND LNA are the solution to my problems. biggrin.gif
Thank you for your kind compliments smile.gif

QUOTE (diiego06 @ Jun 7 2008, 06:03 PM) *
PAP, I know that you are occupied, but, when will we be able to have the LNA 1.7 in our classpad's?
I don't really know, and I don't want to announce release dates, since I did it in the past, and I failed due to the lack of time. However, if I were to guess, I'd say within July.

QUOTE (diiego06 @ Jun 7 2008, 06:03 PM) *
The LNA 1.6 is very useful, I cannot wait to know what us brings the LNA 1.7
In short, LNA 1.7 new features include multiple "window" plots, vector graphics, animated plots, and a few new numerical methods.

QUOTE (diiego06 @ Jun 7 2008, 06:03 PM) *
A suggestion: to improve the function MatPrint, since when the number of columns is too big, we cannot estimate the complete Matrix; if it is not possible to do in the window Console, a good idea would be to do it in a window created with UI package. yesnod.gif
That's a good idea... UI could also be used to implement "windowed" plots etc. I thought about this, I did some experiments with the UI package, but I can't tell I liked it. I have finally decided to keep LNA UI-free for now. LNA is already a "heavy" package, I think it's better to spend the remaining ClassPad resources (and my spare time) to implement some more numerical methods than a better way to print matrices.

QUOTE (diiego06 @ Jun 7 2008, 06:03 PM) *
PD: sorry for my poor English.
Don't worry, my English could be way better as well wink2.gif
girdeux
An other idea: you could add logarithmic and semilogarithmic plots.
PAP
QUOTE (girdeux @ Jun 13 2008, 06:45 PM) *
An other idea: you could add logarithmic and semilogarithmic plots.
*sigh* Yes, that would be nice. Note, however, that making a complete plotting package was never my intention. LNA is mainly a package for numerical computations; plotting capabilities included in LNAplot are for visualizing results obtained by LNA's Numerical Analysis functions. Therefore, I consider logarithmic or semi-logarithmic plots as a low-priority feature.
diiego06
QUOTE
That's a good idea... UI could also be used to implement "windowed" plots etc. I thought about this, I did some experiments with the UI package, but I can't tell I liked it. I have finally decided to keep LNA UI-free for now. LNA is already a "heavy" package, I think it's better to spend the remaining ClassPad resources (and my spare time) to implement some more numerical methods than a better way to print matrices.


Then, that for who be interested, I wrote a function to visualize a Matrix in a new window, MatPUI(M,n), the argument M is a Matrix and the argument n is optional and specifies the number of decimals that will have the elements of the Matrix, besides numbers the elements can be string.

CODE
require "LNAutils/MatTrans" "string"

function MatPUI(m,nd)
local M,lens,l,rows,cols,t,xx,w,dec={},{},{}

if nd==nil then
dec="%.4f"
else dec="%."..nd.."f"
end

rows=#m
cols=#m[1]

for i=1,rows do
M[i],lens[i]={},{}
for j=1,cols do
if type(m[i][j])=="number" then
M[i][j]=string.format(dec,m[i][j])
end
if type(m[i][j])=="string"
then
M[i][j]=m[i][j]
end
lens[i][j]=string.len(M[i][j])
end
end

t=MatTrans(lens)
for i=1,cols do
l[i]=math.max(unpack(t[i]))
end

require "ui"
wmat=ui.window{name="",expand=true,frame="thick",_keydown=function(self,K_EXE) ui.stop() end}

for i=1,rows do
xx=0 w=0
for j=1,cols do
xx=xx+2
w=l[j]*7+3
ui.lineedit{text=M[i][j],x=xx,y=i*15-15,width=w,frame="none",edit=false,parent=wmat}
xx=xx+w
end
end

wmat:show(true)
ui.start()
end

export{MatPUI=MatPUI}

Note that you need the MatTrans (LNAUtils) function too.
suggestions and opinions well will be received smile.gif

something more.

PAP, a form exists of plot only a part of the function in a window? for example: plot f(x)=x among 0<x<5 in a window that have some limits among -10<x<10
PAP
QUOTE (diiego06 @ Jul 4 2008, 07:30 PM) *
Then, that for who be interested, I wrote a function to visualize a Matrix in a new window, MatPUI(M,n), the argument M is a Matrix and the argument n is optional and specifies the number of decimals that will have the elements of the Matrix, besides numbers the elements can be string.
Nice and certainly useful. I must repeat here that I will keep LNA UI-free for two reasons. First, and most important, I prefer to spend CP resources for more interesting things, like implementing additional numerical methods in LNA. Second, I had several crashes when I tried the UI package, and I don't trust it.

QUOTE (diiego06 @ Jul 4 2008, 07:30 PM) *
PAP, a form exists of plot only a part of the function in a window? for example: plot f(x)=x among 0<x<5 in a window that have some limits among -10<x<10
No, not currently in LNAplot library, but I can add such a functionality very easily. Thank you for the remark.
unique33
Hello,

I need a lua code to find The Maximum and Minimum of a function in a domain .
Do you know any numerical method to do this ?

I have prepared an article about Infinity and some Extended Numerical Methods and their Lua Codes. I will post it here after I have registered the Methods .

PAP -> Your messenger Inbox is full and you can not receive any messages .

Regards
unique33
unique33
Hello ,

Maple Software has two command named Minimize and Maximize and compute the maximum and minimum of a function in a domain even +-Infinity .
but I,m still intersted to have a LNA Library to compute Maximum and Minimum of a function in a domain .

Regards
unique33

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.