wingjammer

40 Reputation

4 Badges

11 years, 314 days

MaplePrimes Activity


These are questions asked by wingjammer

I'm using maple to write text to an external text file. My code is

 

f := x-> arcsin(x);

file := "C:\\example.txt":

fopen(file,WRITE,TEXT):

fprintf(file,"%a",f(1)):

fclose(file):

 

The problem is that the output in my file example.txt reads "1/2*Pi" and I'd like it to be "1/2*pi". In other words, is it possible to have maple scan my file and replace the occurances of "Pi" with "pi"?

My question is very similar to this question however my .txt files are in a different format.

I've generated a .txt file with Macaulay2 that looks like this

| -1 0 9  -17 4   |

| 1  2 -3 7    17 |

I would like to import this file into maple and define a matrix M as this matrix. Is there any way to accomplish this?

I'm trying to write an algorithm that arranges the columns of an arbitrary 2xn matrix counter-clockwise starting at the point closest to (1,0). For example, when I input the matrix 

Q := Matrix([

       [ -1 ,  0 ,   0 , -1 ]
     , [  0 ,  1 ,  -1 ,  0 ]

]);

into the algorithm, I would like the output to be

R := Matrix([

       [  0 , -1 , -1 ,   0 ]
     , [  1 ,  0 ,  0 ,  -1 ]

]);

Is there any package that could help me with this? 

I have a matrix with repeated columns

with(LinearAlgebra):

Q := Matrix([1,1,1,0,0,0,-2,-1],[0,0,0,1,1,1,0,-3]);

I'd like to write a loop that defines u[1],...,u[n] to be the unique columns of Q. Is there a way to do this?

I'm writing some code that computes a positive integer N and I'd like Maple to define a function of N variables. I've tried writing 

f := (seq(t[i],i=1..N))-> MY EXPRESSION;

but I receive the error

Error, invalid parameter; functional operators require their parameters to be of type symbol or (symbol::type)

Is there anything I can do here?

1 2 Page 1 of 2