erdem

35 Reputation

5 Badges

12 years, 134 days

MaplePrimes Activity


These are questions asked by erdem

Hi,

 

I am new to Maple and I am trying to write a CFD code. I want my code to be as modular as possible, therefore, I want to use subroutines  in my code. (Because I will need to do some steps several times )

 

Here is one of the main subroutines that I want to call for it in various times with different parameters. I am familiar with matlab so let be show what I mean first in matlab notation.   Lets say my subroutine is called MAT 

I am trying to get the kron of two vectors as in;

 

N=6;
p:=Vector([$0..N]):
pn := KroneckerProduct(p, transpose(p));
but I get this error ==>
Error, invalid input: LinearAlgebra:-KroneckerProduct expects its 1st argument, A, to be of type Matrix, but received Vector(7, {(1) = 0, (2) = 1, (3) = 2, (4) = 3, (5) = 4, (6) = 5, (7) = 6})  
 
Why I can not get kron of two vectors? 

Hi 

I am a Matlab user and just started using maple because I need more precision for my calculations. I failed to make Matlab interface work, therefore, I am writing my codes from the begining. And I am having a problem with a nested for loop.

The thing that I am trying to make is (in Matlab)

for j=1:N;
for i=mod(j-1,2):2:j;
D(i+1,j+1)=2*j;
end
end
 
In maple I tried something like
1 2 Page 2 of 2