Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 7 years ago

Xenia gravatar image

Corresponding value of a parameter

Hello, I am quite new to Sage and I have the following question. In my computations I have a quadratic form: xTAx=b , where the matrix A is defined already as a symmetric matrix, and x is defined as

W = itertools.product([0,1], repeat = n)
for w in W: w = vector(w)

as all combination of [0,1] repeated n times. I got a set of values for b and extracted few of them from the set. Now, I need to identify which x is corresponding to a particular value of b. Is there any command to do so? If it is possible. Thank you for help.

Corresponding value of a parameter

Hello, I am quite new to Sage and I have the following question. In my computations I have a quadratic form: xTAx=b , where the matrix A is defined already as a symmetric matrix, and x is defined as

W = itertools.product([0,1], repeat = n)
for w in W: w = vector(w)

as all combination of [0,1] repeated n times. I got a set of values for b and extracted few of them from the set. Now, I need to identify which x is corresponding to a particular value of b. Is there any command to do so? If it is possible. Thank you for help.

Corresponding value of a parameter

Hello, I am quite new to Sage and I have the following question. In my computations I have a quadratic form: xTAx=b , where the matrix A is defined already as a symmetric matrix, and x is defined as

W import itertools 
X = itertools.product([0,1], repeat = n)
for w x in W: w X:
     x = vector(w)
vector(x)
     print x

as all combination of [0,1] repeated n times. I got a set of values for b and extracted few of them from the set. Now, I need to identify which x is corresponding to a particular value of b. Is there any command to do so? If it is possible. Thank you for help.

click to hide/show revision 4
retagged

updated 7 years ago

FrédéricC gravatar image

Corresponding value of a parameter

Hello, I am quite new to Sage and I have the following question. In my computations I have a quadratic form: xTAx=b , where the matrix A is defined already as a symmetric matrix, and x is defined as

import itertools 
X = itertools.product([0,1], repeat = n)
for x in X:
     x = vector(x)
     print x

as all combination of [0,1] repeated n times. I got a set of values for b and extracted few of them from the set. Now, I need to identify which x is corresponding to a particular value of b. Is there any command to do so? If it is possible. Thank you for help.