Re: [sage-support] Why is this Value Error raised?

2014-10-30 Thread smohammadh
Here is a complete code which works the same as original code, independently: L=2; var('s','t','T') DH=[2,0,0,2] HS={(0,1):(-1/2)*(1-s), (0,2):(-1/2)*(1-s), (1,0):(-1/2)*(1-s), (1,3):(-1/2)*(1-s), (2,1):(-1/2)*(1-s), (2,4):(-1/2)*(1-s), (3,1):(-1/2)*(1-s), (3,2):(-1/2)*(1-s)}; HS1={(i,i): DH[i

[sage-support] Re: Why is this Value Error raised?

2014-10-30 Thread smohammadh
I'm so sorry, it seems there are some typos I should edit: ... I need to solve a large system of first order ODE's:(i is imaginary unit) > i*y'[t]=A[t].y[t] > to find* y[t] *(a vector of n functions of *t*), given *y[0] *and *A[t]* > (a sparse matrix ... > -- You received this message becaus

Re: [sage-support] Why is this Value Error raised?

2014-10-30 Thread smohammadh
Dear Dr. William, Thanks for your attention, but what you stated is not really my problem. Since the code above is just a part of my whole code, the software also does not reflects such 'NameError' to me. Moreover, as I stated, it even works without any errors when A[t] equals zero. By using 'A_

Re: [sage-support] How to create and use lists of variables?

2014-10-30 Thread smohammadh
Due to a system malfunction, I was not able to post my new question, immediately. So after a day, I've already posted it, titled as "Why is this Value Error raised?". -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this gro

[sage-support] Why is this Value Error raised?

2014-10-30 Thread smohammadh
#In The Name of God# Hello to every one. I need to solve a large system of first order ODE's:(i is imaginary unit) i*y'[t]=A[t].y[t] to find PSI[t](a vector of n functions of t), given PSI[0]and A[t] (a sparse matrix with linear terms of t as non-zero elements). As a begginer Sage user, I tried t

Re: [sage-support] How to create and use lists of variables?

2014-10-28 Thread smohammadh
Thank you so much! I'm sorry I couldn't answer earlier. It worked as I expected. Now as the last question on this discussion, do I need to use 'SymbolicSequence', when I want to numerically solve a large ODE system? I tried to use instructions in "Solving ODE numerically by GSL" from the Docume

Re: [sage-support] How to create and use lists of variables?

2014-10-25 Thread smohammadh
Thank you Michael, I loaded the file and succeeded to make a list of symbols. But now and after evaluating my expression in terms of its elements, how should I assign them different values I want the expression to be calculated for? (see a part of my code above, it may illustrate what I mean)

[sage-support] Re: How to create and use lists of variables?

2014-10-24 Thread smohammadh
Thanks for your answer. Though I have defined and now use such a function you suggested, but I need to calculate this function later for thousands of different inputs. This means a huge amount of computation that can be avoided, by once deriving an expression in terms of x[i]'s and then just r

[sage-support] How to create and use lists of variables?

2014-10-22 Thread smohammadh
Hello to every one, I am a *primitive *sage user and I want to produce a function of n variables (x[1],x[2],...,x[n]), in nested 'for' loops. I've searched in sage's documentation, but I have still 2 problems: 1. How to define a list of variables, such that I can use its items, as independent va

[sage-support] Re: [sage-devel] How to input a large system of equations?

2014-09-23 Thread smohammadh
Thanks for *vdelecroix* for redirecting my post to this group, and for all useful posts. It seems that my last sentence about Nestlists -to some extent- misleads my friends. The main point I want to know is: what is a simple way to create a large system of equations and initial conditions, su