« first day (2586 days earlier)      last day (1908 days later) » 

8:48 AM
Hello, I am facing problem when using this Mathematica code like this. Please help
@halirutan sir, I have commented on you post. Please check it.
 
9:16 AM
@taritgoswami the permissions on your notebook mean that we can't view it at the moment!
@taritgoswami Reading the error message, it seems like you've missed a comma or a bracket somewhere (the fact that it's a Syntax error makes me think that). I'd recommend dividing up your code into multiple cells and evaluating it piece-by-piece until you find a line that causes the error by itself.
 
@taritgoswami Why are you doing vect=vec[[1]]?
 
In vec we have got 3 eigenvectors, vect is the first one
 
OK, but then what is vect[[1]], vect[[2]], and vect[[3]] going to do?
 
We want to access each coordinate individually
 
9:27 AM
OK, have a think about your code. vec is {-9.24336 + 0. I, 0.0988431 + 0.994994 I, 0.0988431 - 0.994994 I}. So vec[[1]] will be -9.24336 + 0. I, and thus vec[[1]][[1]] will give an error.
perhaps you mean Eigenvectors instead of Eigenvalues
In fact, I bet that's what you mean
eg:
 
No, vec contains three eigenvectors. we want to use them later for different purpose where we need grams schimdt orthogonaisation. So we are using the lower part. Individually without gram schimdt part, it works but not with it. I tried to test individually Gram schmidt with a test case. it works But combined it doesn't.
 
 
2 hours later…
11:12 AM
@taritgoswami OK, well, what I'm trying to explain to you is that there is a syntactic mistake in your code - you can't get the [[3]]rd part of something that doesn't have a [[3]]rd part.
 
 
1 hour later…
12:30 PM
@taritgoswami This looks like a bug in the wolfram-cloud. I don't understand it. I have stripped you code a bit and we can use SyntaxQ to see if it is syntactically correct:
In fact, I can copy the exact code to my desktop Mathematica and it works.
Anyway, this here seems to work even in the cloud:
a = 0.2; b = 0.2; c = 9.25; del = 0.01;
xe = (c - Sqrt[c^2 - 4*a*b])/2;
ye = -(c - Sqrt[c^2 - 4*a*b])/(2*a);
ze = (c - Sqrt[c^2 - 4*a*b])/(2*a);
jac = {{0, -1, -1}, {1, a, 0}, {ze, 0, xe - c}};
vec = Eigenvectors[jac];
gramschmidt[w_?MatrixQ] := Module[{v = ConstantArray[0, Length[w]]},
    Table[
       v[[n]] = w[[n]] -
           Sum[(v[[i]].w[[n]]/v[[i]].v[[i]])*v[[i]], {i, 1, n - 1}],
       {n, 1, Length[w]}];
   v
  ]
gramschmidt[vec]
 
 
11 hours later…
11:13 PM
@taritgoswami Oh, I'm really sorry, I actually made a mistake, I thought you used Eigenvalues twice, instead of Eigenvectors the second time. My apologies.
 
11:24 PM
@CarlLange The mysterious syntax error is quite funny.
 

« first day (2586 days earlier)      last day (1908 days later) »