MichalKvasnicka

229 Reputation

10 Badges

21 years, 174 days

MaplePrimes Activity


These are replies submitted by MichalKvasnicka

Nearly week ago after Maple 2025 release, there are still NO On-Line help and NO Maple Manuals for Maple 2025 ?!
This is the normal way how Maplesoft celebrate the new release???

The simple and fully functional workaround is:

# Matlab obsolete libbsd fix (Ubuntu 24.04):
export LD_PRELOAD=/lib/x86_64-linux-gnu/libbsd.so.0

Next MATLAB release R2025a should solve this problem by using more recent version of libbsd directly in MATLAB.

Fact is, that new version (Ubuntu 24.04) of csh, which is required for Matlab link from Maple is not compatible with default libbsd library used by MATLAB as default (libbsd ver. 0.4.2). Ubuntu 24.04 using libbsd (ver. 0.12.1) , but MATLAB using older version included in the MATLAB release.

So, what is the proposed workaround to solve this serious trouble, in a case of using MatlLink functionality at Maple on the newest releases of Ubuntu 24.04 based Linux OS's???

@acer Yes, you are right! My end-goal is not clear.

My main intention is to find a computationally efficient form of specific 4x4 matrix exponential expFT with several input parameters (omega1, omega2, fp, fd1, fd2, lambda1, lambda2 and T), which define the input matrix F. The problem is motivated by specific requirement, that the final evaluation code must not contain general function for matrix exponential.

What about use of Maple  "codegen" with cost() and optimize functions?

Option optimize(f,'tryhard') produce impressively compacted expressions.

with(codegen, optimize, makeproc, cost, prep2trans);
optimize(expFT[1, 4], 'tryhard');

t104 = f__d2 omega__2, t93 = f__p + t104, t89 = lambda__2 t93,

                                                             2  
  t95 = f__p + f__d1, t109 = t95 lambda__1 + t89, t100 = f__p ,

                                             2    2  
  t103 = lambda__1 lambda__2, t88 = lambda__2  t93 ,

                 2           /   2              
  t97 = lambda__1 , t99 = pow|t95  t97 - 2 (t100
                             \                  

   + ((2 omega__1 + omega__2) f__d2 + f__d1) f__p - f__d1 t104)

              1\                      
  t103 + t88, -|, t108 = -t99 + t109,
              2/                      

  t90 = (omega__1 + omega__2) f__d2, t106 = omega__1 f__p,

             T                                    
  t105 = - ------, t102 = -t95 t97 t90 - (f__p t95
           2 f__p                                 

   + (3 t106 + (2 f__p - f__d1 + t90) omega__2) f__d2) t103 + t88,

  t83 = t99 + t109, t82 = (-t90 lambda__1 + t89) t99, t1 =

         1         /   /1                            
  ---------------- |16 |- (t102 + t82) exp(t108 t105)
          2      2 \   \2                            
  t99 t108  T t83                                    

     1                            
   + - (-t102 + t82) exp(t83 t105)
     2                            

                                                          \      
   + t99 (((t90 + t95) T lambda__2 + t90) lambda__1 - t89)| lamb\
                                                          /      

                 \
  da__2 t100 t106|
                 /


optimize(expFT[1, 4]);
t1 = omega__1 + omega__2, t2 = f__d2 t1,

  t5 = f__d2 omega__2 + f__p, t6 = t5 lambda__2,

                            2                 2            2  
  t8 = f__p + f__d1, t9 = t8 , t10 = lambda__1 , t12 = f__p ,

                 2          2                                   
  t24 = lambda__2 , t25 = t5 , t26 = t25 t24, t28 = (t10 t9 - 2

  lambda__1 (t12 + ((2 omega__1 + omega__2) f__d2 + f__d1) f__p

   - f__d1 f__d2 omega__2) lambda__2 + t26)^(1/2),

                                                              2  
  t29 = t28 (-t2 lambda__1 + t6), t31 = t10 t8 t2, t33 = f__d2 ,

  t45 = lambda__1 lambda__2 (t33 t1 omega__2

   + ((2 f__p - f__d1) omega__2 + 3 omega__1 f__p) f__d2

                                          1    
   + t8 f__p), t47 = lambda__1 t8, t50 = ----,
                                         f__p  

           /  1                        \                        
  t53 = exp|- - t50 (-t28 + t47 + t6) T|, t57 = t28 + t47 + t6,
           \  2                        /                        

           /  1          \                                  2  
  t61 = exp|- - t50 t57 T|, t79 = (-t8 lambda__1 + t28 - t6) ,
           \  2          /                                     

           2              1       /                      /1     
  t83 = t57 , t88 = ------------- |16 t12 f__p lambda__2 |- t53
                    t83 T t79 t28 \                      \2     

                            1                            
  (t29 - t31 - t45 + t26) + - t61 (t29 + t31 + t45 - t26)
                            2                            

                                                                \         
   + (lambda__1 (lambda__2 T (f__p + t2 + f__d1) + t2) - t6) t28| omega__1
                                                                /         

  \
  |
  /

cost(expFT[1, 4]);
221 multiplications + 119 additions + 18 functions + 5 divisions

cost(optimize(expFT[1, 4]));
32 additions + 24 assignments + 57 multiplications + 4 functions

   + 5 divisions

cost(optimize(expFT[1, 4], 'tryhard'));
26 additions + 18 assignments + 46 multiplications + 3 functions

   + 5 divisions

Any remarks, regarding this idea?

A few questions:
1. Any idea, how to transform optimze output to the final compacted expression?
2. Is possible to share intermediate variables produced by optimize process over all expFT matrix elements?

@dharr Thanks for hint to use "indets" command and other recommendations. I will try to make some additional research on this topic.

The additional conditions should be probably used not so directly, via reducing of two variables. In the matrix exponential is possible to locate terms of the following forms:

-  

which should be directly substitute by "1", but I do not know what is the proper Maple implementation.

Moreover, thera samo additional terms suitable for substitution:

-

(these two terms are mathematically identical, for example)

-  

- etc.

So finally, I am looking for some "general" symbolic approach how to find compact as possible form based on proper substitutions and additional conditions. But I am afraid, that this task could be very complex and hard, in general.

P.S. "Is the last row really intended to be zero?" ... Yes this is correct, this is standard form of tranforming procedure of the continuous LTI dynamic system by First Order Hold (FOH) approximation to the discretized form. See for example attached file: 

Gene_F._Franklin_-_Digital_control_of_dynamic_systems-Ellis-Kagle_Press_(2006)_230-232.pdf

see eq. (6.43) and (6.44). Where matrix at eq. (6.43) is my input matrix.

@Thomas Richard For example, R2023(a,b) is not fully supported, because Maple 2023.x installers are not able to locate MATLAB installation directory automatically. But, it is able for R2021 and older versions of MATLAB.

Maplesoft should follow current MATLAB versions more carefully!

@TechnicalSupport what is Maplesoft official statement regarding absence of support the latest MATLAB  version R2023b by Maple 2023?

@sursumCorda from my point of view is this situation big disappointment. Maple toolbox for Matlab was always far better than native Matlab symbolic toolbox, but now...??? It is only matter of time when the Maple toolbox will be obsolete and incompatible with recent versions of MATLAB. 

@Christian Wolinski Obviously, Maple offers a lot of ways to "simplify" my expression. Thanks!

@C_R  Yes, I have the same experience. Maple help does not provide good guidance to find the fact, that the "evala" is the proper function to simplify my expression :)

@acer

Thanks! So, user should always experiment with many possible ways ...

I understand that Maple does not know what equivalent expression is expected by user, but this case is so simple. I am a bit surprised.

@Christopher2222 Any news from Maplesoft support regarding Maple on-line help?

@Preben Alsholm OK... It's nice to know your personal reason for deleting my answer.

A few additional and final questions:

1. What is wrong with choosing one's own answer as the best in the absence of any other answers? Basically, this opportunity is open to anyone. If this is a bad habit, turn this option off.

2. What is irrelevant about my deleted answer? I'm just replying that Maplesoft is obviously ignoring all the current information about the terribly outdated Maple online help. That is all!!!

3. It is truly alarming that some highly respected people are willing to delete anything that does not align with their personal philosophy. Is the fact that Maplesoft hasn't updated the online help for almost 2 years ok with you?

4.So this isn't abuse, am I right?

OK ... somebody highly reputed deleted my answer!? Is that really common practice here?

I just comment the situation, that after week of escalation of the problem still no progress with outdated on-line help :(

What I did so wrong ... to be deleted???

1 2 3 4 5 6 Page 2 of 6