## CodeGeneration -- Some constants are not replaced ...

Hi, I have a small problem. I want to export code to Matlab. The code is mostly a long expression with some named constants. The constants are set to some values in Maple and in Maple only the x-variables are therefore unknown in the expression. However, in the exported code, some of the constants are not replaced by their values. Does someone have a clue what this depends on? Best regards Johan

can I change the behavior of maple to not represent 1/sqrt(2) as sqrt(2)/2? I guess in a mathmatician's view this is a simplification, but not from an engineering standpoint. also, if I perform combine(sqrt(2)/(sqrt(m)*sqrt(k)),radical,symbolic) I get sqrt(2)*sqrt(1/m k) instead of the desired sqrt(2/(k*m))..is this related? I'm sure there is a nuance that I am not getting...

## graphing a moving particle on two 3-D sphjeres...

i am trying to plot a moving particle on two separate sphers of different radii. i have the code: restart: > with(plots): > with(plottools): > p1:=plot3d([3*sin(u)*cos(v),3*sin(u)*sin(v),3*cos(u)], u=0..Pi, v=0..2*Pi,color=red, > style=wireframe,axes=normal,scaling=constrained): > p2:=plot3d ([2.9*sin(u)*cos(v),2.9*sin(u)*sin(v),2.9*cos(u)], u=0..Pi, v=0..2*Pi,color=blue,axes=normal,scaling=constrained): > p3:=display(p1,[seq( pointplot( { [3*sin(u)*cos(v)(k/50)(n/50),3*sin(u)*sin(v)(k/50)(n/50),3*cos(u)(k/50)(n/50)],[2.9*sin(u)*cos(v)(k/50)(n/50), 2.9*sin(u)*sin(v)(k/50)(n/50),2.9*cos(u)(k/50)(n/50) ] } ) , (k,n)=(0..314,0..314) ) ],insequence=true):

## Export data with a given display precision...

Hello, I learned in this forum that if one wants to display the elements of a matrix up to 6 decimal figures one uses interface(displayprecision=6); But then I tried to export a matrix with ctrl+c / ctrl+v to another application and when I pasted it the matrix appeared with a different number of decimal figures. My question is: how do I export a matrix with a given number of decimal figures? Thanks, Bernardo

## Using the 'do' function...

If i have a sequence of r[i+1] = 2r[i-1] + 3r[i] (where [i] represents subscript i) how do I use the 'do' function to go from the point where initially r[i-1] is, for example, 3 and r[i] is 4 to the point at which r[i-1] is first greater than 300 and find r[i+1] at this point. I hope this question makes sense! Thankyou

## Load own library at start-up...

Have spent much of the weekend reading the maple help files and googling but still haven't found a current way to do this on XP with v9.5. Tried editing the maple9.5.ini file to point to the folder, but it doesn't work and seems to behave more like a log file. I can use libname as a line in the worksheet but would prefer to do without as I use the modules a lot. Any suggestions would be welcome. Neil

## how to solve the question...

How do I plot f(x) in the following question? f:=x->sum(h(2^n*x)/(2^n),n = 0 .. 20) h(x)={ 2x , 0<><>

## Eigenvectors of 2x2 Matrix with trig functions...

How can I evaluate the eigenvectors of a 2x2 Matrix with trig functions as entries? This is what I did: ```with(LinearAlgebra): K:=<<cos(theta)|sin(theta)>,<sin(theta)|-cos(theta)>>; Eigenvectors(K); Error, (in LinearAlgebra:-LA_Main:-Eigenvectors) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values ``` I'm wondering why cos(theta) shouldn't be an algebraic function ?? Assuming theta to be real I get the same.

## Vector plot...

How can I plot some velocity vectors on a circle. the function of velocity vectors is (1+cos(t))i+(sin(t))j thank you very much

## function versus functional operator...

So, why are we given two ways of defining a function, one using " := " and the other using " -> "? The latter seems pretty clunky. What use is it?

## Pallete item for "algsubs"...

There is an icon in the Expressions pallete for "eval". Why isn't there one for "algsubs" which seems to be far more useful than the "eval" command. Or maybe I've missed something.....

## Animation of Derivative...

I would like to animate a function and its derivative together in a sort of trace feature like you can do on a TI calculator. I am unsure if this is even possible, was wondering if someone else has done it or has any ideas... Thanks in advance, Brandon