55 Reputation

3 Badges

1 years, 300 days

MaplePrimes Activity

These are questions asked by Lana

I am using some custom procedures which return error messages if something doesn´t work as planned and would need to make a distinction (when using try..catch) between these errors and all the other potential error messages Maple can return. Is there a way to do this efficiently - without having to list all of the error messages from my own procedures after catch?

I am trying to present a linear combination of vectors as such using mathML. In order to prevent automatic simplification I use InertForm package. The problem is, it also leaves me with unevaluated vector command, which is the only part of the expression I don't want to be inert.

Str :=  "1/3*Vector([3^(1/2), -3^(1/2), 3^(1/2), 0]) -1/3*Vector([3^(1/2), 3^(1/2), 3^(1/2), 0])+ Vector([2,1,1,0])":

Set := {op(InertForm:-Parse( Str ))};
Set := {-%*(%/(1, 3),

  %Vector([%^(3, %/(1, 2)), %^(3, %/(1, 2)), %^(3, %/(1, 2)), 0])),

  %*(%/(1, 3),

  %Vector([%^(3, %/(1, 2)), -%^(3, %/(1, 2)), %^(3, %/(1, 2)), 0])

  ), %Vector([2, 1, 1, 0])}


Hence my question: Is there a way to only evaluate the vector command, while keeping the rest of the expression inert?

CorrBasis := {<sqrt(3),2,0>, <0,1/5,1>};
CorrMat := Matrix([op(CorrBasis)]);

Basis := {<3^(0.5), 2., 0.>, <0.,0.2,1.>}; #float
Basis := remove(i -> is(LinearAlgebra:-Rank(<CorrMat|i>) <> nops(CorrBasis)),  Basis);

I need to use matrices/ vectors with different datatypes. Do I need to turn them all into floats in order for Basis to remain the same after calling

Basis := remove(i -> is(LinearAlgebra:-Rank(<CorrMat|i>) <> nops(CorrBasis)),  Basis);

Is there any better way to manage this?

I need to sort a list of vectors, so that the vectors which have a norm of 1 come first (the order of remaining vectors is irrelevant). What would be an efficient way to do that?

Page 1 of 1