## 5 Reputation

3 years, 286 days

## Maple CodeGeneration exports matrix wron...

Maple 2020

Hello,

I'm using the command

Matlab(AA,resultname="A",optimize=tryhard)

to generate Matlab code for a quite big matrix. The first problem is, that I get a lot of the following warnings

Warning, cannot resolve types, reassigning t33's type

for a bunch of different t** variables. When I copy the generated code to Matlab I get the error: 'Dimensions of arrays being concatenated are not consistent.'

I found that some entries are obviously transposed like

t50 = [0 0 0 0 0 0 t34 0 0 0 0 -t33 t37 0 0 0 0 0 -t44 0 0 0 0 0 t49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];

should be a column vector. Here is a snippet of how the resulting matrix A is constructed (I can't show the full code because it consists of some 100 lines):

A = [t50 t97 t143 t190 t237 t261 ... ]

I tried to manually transpose the entries. The matrix can be generated but the dimension is wrong, hence, it must be a wrong matrix then. Does anyone know what could be the reason for this? I generate the matrix via the Hessian-command

## Convergence conditions for series...

Maple

Hello,

I'm quite new to Maple and as practise, I want to calculate some z-Transformations via the definition (sum).

sum(z^(-k),k=0..infinity) assuming abs(z)>1; this one works fine (after I added the convergence condition abs(z)>1.

sum(exp(a*k*Ta)*z^(-k),k=0..infinity) assuming abs(exp(a*Ta)*z^(-1))>1; doesn't work. But I if I change the convergence condition to a*Ta<ln(z), it is calculated correctly. Why does the first attempt not work? What is the correct way to tell maple the convergence condition?

 Page 1 of 1
﻿