ComputerUser

535 Reputation

10 Badges

12 years, 206 days

Social Networks and Content at Maplesoft.com

Seldom to ask question after retired math hobby Just waiting for beauty who born in 1994 And waited for her email to mavio@protonmail.com What is the difference in ownership among different universe?

MaplePrimes Activity


These are questions asked by ComputerUser

For example

if x*y*z+ x*y^2

after filter 

x*y*z

i have two functions , first naive function has error after used.
 
if run FromMatlab, does it mean that do not need to copy the result and run again because it had already run?
as i do not understand the output code after translated.
 
there is syntax error when translate second function
 
with(Matlab):
FromMatlab("function X = sylv_naive(A,B,Q)
% X=SYLV_NAIVE(A,B,Q) solves the Sylvester equation AX + XB = Q
%    A, B, Q: matrix coefficients
%    X : solution of AX + XB = Q
[m,n] = size(Q);
H = kron(eye(n), A) + kron(B.', eye(m));
Qvec = reshape(Q,m*n,1);
Xvec = H\Qvec;
X = reshape(Xvec,m,n);
");
sylv_naive(Jesus7,Jesus7,Matrix([[0,0],[0,0]]));
sylv_naive(Jesus7,Jesus7,Matrix([[0],[0]]));
Error, (in ArrayTools:-Reshape) the desired output contains a different number of elements than the input
 
 
 
with(Matlab):
FromMatlab("function X = sylvester(A,B,Q)
% X=SYLVESTER(A,B,Q) solves the Sylvester equation AX + XB = Q
% by using the Bartels and Stewart algorithm based on the complex
% Schur decomposition
%    A, B, Q: matrix coefficients
%    X : solution of AX + XB = Q
[m,n] = size(Q);
[U,A1] = schur(A,'complex');
[V,B1] = schur(B.','complex');
Q1 = U'*Q*conj(V);
X = zeros(m,n);
X(:,n) = (A1 + B1(n,n)*eye(m))\Q1(:,n);
for i = n-1:-1:1
    v = Q1(:,i) - X(:,i+1:n)*B1(i,i+1:n).';
    X(:,i) = (A1 + B1(i,i)*eye(m))\v;
end
X = U*X*V.';");

Error, (in Matlab:-FromMatlab) on line 15, syntax error
    X(:,i) = (A1 + B1(i,i)*eye(m))
 
 

if known solution [a,b,c,d]

solve([eq2, eq3, eq4, ....], [a,b,c,d])

but not equal to known solution a,b,c,d even if number of equations more than number of variables.

then guess that there are some necessary and sufficient conditions unknown.

how to find the necessary and sufficient conditions from solutions?

is there options to set for this?

or can eliminate function help to find necessary and sufficient conditions and how to do?

 

 

 

Is it possible to use Regex to generate a complete list of patterns?

for search pattern in a list of characters

A[k]:= x;
A:= table().

how to sort hashtable by key which is a list of matrix

after sort, is possible to group by key? and how?

First 22 23 24 25 26 27 28 Last Page 24 of 141