forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 8:52 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Fri Nov 12, 2010 2:37 pm 
Offline

Joined: Fri Nov 12, 2010 4:48 am
Posts: 3
Sergey.Bochkanov wrote:
Can you post code which calls ALGLIB and gets zero matrix?



real_2d_array samet = "[[10,12,6],[12,15,7],[6,7,11]]", temp;
real_1d_array dd;
smatrixevd(samet,3,1,true,dd,temp);
for(int a =0; a<3;a++)
{
printf("%.6lf ,", dd[a]);
}
cout<<endl;
for (int i =0; i<3; i++) {
for (int j=0; j<3;j++) {
printf("%.6lf ,", temp[i,j]);
}
cout<<endl;
}


Here is output
0.234527 ,6.385771 ,29.379703 ,
0.000000 ,0.000000 ,0.000000 ,
0.000000 ,0.000000 ,0.000000 ,
0.000000 ,0.000000 ,0.000000 ,


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Fri Nov 12, 2010 3:03 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You have error in the printf statement. It must be
Code:
printf("%.6lf ,", temp[i][j]);


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Fri Nov 12, 2010 9:10 pm 
Offline

Joined: Fri Nov 12, 2010 4:48 am
Posts: 3
I certainly did... now it works.
Thank you so much.


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Sat Nov 13, 2010 7:26 pm 
Offline

Joined: Fri Nov 05, 2010 12:47 pm
Posts: 9
Sergey.Bochkanov wrote:
You can allocate array with setlength call and assign values to its elements manually.

Please provide a code on using setlength call in the program.
Also please add a code which shows the use of double array(2-dimentional) and used with smatrixevd function.
Thank You.


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Mon Nov 15, 2010 9:00 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You can read manual for such info: http://www.alglib.net/translator/man/ma ... #gs_vecmat

As for examples on smatrixevd()... well, it is planned to add examples for all ALGLIB functions. However, this particular function is really easy to use, thus it is not in top-priority list.


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Tue Nov 16, 2010 4:47 pm 
Offline

Joined: Fri Nov 05, 2010 12:47 pm
Posts: 9
Can we integrate complex exponential functions using ALGlib? please suggest a function to do so.

Also I wanted to know is it possible to extract value of integration at certain points between limits?
ex. If I am integrating over limits of [0,100], I want to find what the values are of the integration function provided by ALGlib
for all the multiples of 10 between [0, 100].
The reason is I want to plot a graph of these extracted values against the limit values.


Top
 Profile  
 
 Post subject: Re: needed help on how to use smatrixevd function
PostPosted: Tue Nov 16, 2010 7:10 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
In the current version you have to manually divide interval into smaller intervals and calculate integrals.

As for complex integrals, you can calculate them by reducing your problem to the two real ones.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group