## Is there any convenient tool to convert Maple work...

Is there any convenient tool to convert Maple worksheet to Matlab m file, until today?

## Is it possible to call Matlab solver directly from...

As you know the matrix calculations of the Matlab is more powerfull than Maple, My question is that is it possible to call Matlab solver from Maple worksheet? I mean, in part of my Maple worksheet (for loop) I need to compute the eigenvalue and square root of a big matrix (order of 1000) that Maple couldnt while Matlab can do it. So it will be so nice if I can call Matlab directly from my ws rather than I export my data and import it to Matlab and calculate and return back to Maple (manualy It is tedious).

Is it possible???

## How to define user defined function like Mattlab?...

I want to produce a user defined function in Maple and use it in my program like Matlab. My function in Matlab is as below:

function R=ff(i,m)
K=1;
Q= zeros( i );
for j=1:2:i
Q(j)=2*i-K;
K=4+K;
end
R=Q(m);

How to produce this function in Maple and use it in my program?

## how to run maple code in matlab? ...

Dear all

I have created a script code in maple. I also have contructed a power circuit in matlab simulink. How I use my code in matlab?

## How to convert a huge expression from Maple to Mat...

Dear all:

I have used the "diff" command in Maple to help me derive a huge and very long function, and now I want to convert this huge expression from Maple to Matlab format, for example, into a Matlab .m file. The format of this expression in Maple is very different from Matlab.

So could you help me with this problem?

Thank you all.

## MAPLE To MATLAB...

 >

Paramétres

 >
 (1.1)
 > beta := 30;
 (1.2)
 >
 (1.3)

 >
 >
 (1.4)
 >
 (1.5)

Résolution & plots

 >
 (2.1)
 >
 (2.2)
 >
 (2.3)
 >

ET

 >
 (3.1)
 >
 (3.2)
 >
 >
 (3.3)
 >
 (3.4)

Hi evey ones ;

how can i convert these code below TO matlab

thank a lot Maple_to_MATLAB.mw

## Generation of a random array...

To gererate a random initail cofigration -1 or 1

spin = (-1).^(round(rand(N)));

for i=1:1000,

neighbours = circshift(spin, [ 0 1]) + ...

circshift(spin, [ 0 -1]) + ...

circshift(spin, [ 1 0]) + ...

circshift(spin, [-1 0]);

how to do this in maple?

## Is Ising a package?...

Hi all

Is Ising a package?

for i = 1:12000

%while (1),

% Choose a random value between 0 and 1 for the interaction strength

J = rand()+1e-10;

% Perform a simulation

[M, N, E] = ising2(n_grid, J);

% Records the results

Ms = [Ms M/(n_grid^2)];

Es = [Es E/(n_grid^2)];

Ns = [Ns N];

Js = [Js J];

i = i+1;

## How to rearrange equations...

Hello,

I have a complex set of non linear diff eqns in the form :

y1'' = f(y1',y1,y2'',y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4) ;

y2'' = f(y1'',y1',y1,y2',y2,y3'',y3',y3,y4'',....,y6'',y6',y6,u1,u2,u3,u4)

and so on ... y6''=(...)

As I want to resolve this coupled systeme in matlab using @ODE45... I wanted the equations in the form : y1''=f(y1',y1,y2',y2,....) and so on ... => X'[] = f(X[],U[])

How can I force maple to rearrange a system of coupled eqns with only the variables i want ?

I know this is possible beacause it is a nonlinear state space model but maple do not work with nonlinear state space model... It give me error when I tried to create statespace model with my non linear diff eqns.

Thanks a lot !

## Help with MATLAB code...

Hello

I am a student of an engineering career

The math teacher is going to ask us to solve some exercises Matlab

The teacher is very hard and explains nothing of Matlab in class

We must learn to use the program on our own viewing internet watching tutorials

I was wondering if somebody could help solve some exercises.

Are only three exercises which are imposible to me

I would appreciate it greatly.

Thank you

My e-mail :

alessagosti1@gmail.com

## MATLAB connectivity problem ...

Environment: Maple2015, MATLAB_R2014b(MacOSX10.8.5), 2015b(MacOSX10.11.4)

MapleToolbox2015.1MacInstaller.app was successfully completed (log tells us), but when MATLAB were booted, following error messages appeared and symbolic operations of maple failed.

This would be closely related to maple installation on MATLAB as such errors never occur for clean install of MATLABs and looks independent on OSX versions. Now javaforosx.dmg in use by instruction of Maplesoft.  Something wrong is in Maple2015. Note maple-MATLAB link works normally.

Please provide us with direction of how to fix it hopefully by Maplesoft professionals.

(Quote of MATLAB command window display)

at jogamp.common.os.MachineDescriptionRuntime.getPointerSizeInBytesImpl(Native Method)

at jogamp.common.os.MachineDescriptionRuntime.getRuntimeImpl(MachineDescriptionRuntime.java:138)

at jogamp.common.os.MachineDescriptionRuntime.getRuntime(MachineDescriptionRuntime.java:124)

at com.jogamp.common.os.Platform.<clinit>(Platform.java:228)

at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:83)

at com.mathworks.hg.peer.JavaSceneServerPeer.initializeJOGL(JavaSceneServerPeer.java:114)

at com.mathworks.hg.peer.JavaSceneServerPeer.<clinit>(JavaSceneServerPeer.java:100)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:190)

>> maple();

error: maple (line 178)

Invalid MEX-file '/Applications/MATLAB_R2014b.app/toolbox/maple/maplemex.mexmaci64':

Referenced from: /Library/Frameworks/Maple.framework/Versions/2015/bin.APPLE_UNIVERSAL_OSX/libhf.dylib

Expected in: /usr/lib/libSystem.B.dylib

in /Library/Frameworks/Maple.framework/Versions/2015/bin.APPLE_UNIVERSAL_OSX/libhf.dylib

>> syms x  y

error: sym (line 186)

Invalid MEX-file '/Applications/MATLAB_R2014b.app/toolbox/maple/maplemex.mexmaci64':

Referenced from: /Library/Frameworks/Maple.framework/Versions/2015/bin.APPLE_UNIVERSAL_OSX/libhf.dylib

Expected in: /usr/lib/libSystem.B.dylib

in /Library/Frameworks/Maple.framework/Versions/2015/bin.APPLE_UNIVERSAL_OSX/libhf.dylib

error: sym (line 56)

assignin('caller',varargin{i},sym(varargin{i}));

(Unquote)

## Bound of while loop...

Hello all,

here the programme I think there are some mistakes couldnot know where please any comment will be helpful:

# Firstly, set the size limit for the grid, which shall define how many
# points there are in both the vertical and horizontal direction
size=40;
# limit is a variable used to set an unobtainable upper bound
limit=size+1;
# x defined, starting at 1, and two other variables ud (upper diagonal) and
# dd (downward diagonal) begin at 0. All three are used to iterate through
# line creation

x=1;
ud=0;
dd=0;
# Iteration through x, using the line function to create a number of
# horizontal lines up to the limit point

while(x<(limit))
line([0, size], [x, x]);
x=x+1;
end

# Now iterating through the diagonals pointing upwards, using two sets of
# lines, both starting from the line going through the origin. The first
# iterates through the lines that pass through positive x values at y=0,
# the second iterates through the lines passing through negative x values
# at y=0
# ud must be increased by 2 each time to ensure that equilateral triangles
# are formed.

while(ud<(limit))
line([(ud), (size)], [0, (size-ud)]);
line([0, (size-ud)], [(ud), (size)]);
ud=ud+2;
end

# Similar to before, except this time iterating through downward pointing
# diagonals.

while(dd<(limit))
line([(dd), 0], [0, (dd)]);
line([(size), (dd)], [(dd), (size)]);
dd=dd+2;
end

# xvector and yvector set up as two vectors holding x and y co-ordinates of
# points respectively.

xvector = zeros(1, limit);
yvector = zeros(1, limit);

# Reinitiallising x and y values for iterative purposes.

x=0;
y=0.5;
n=1;

# The program now iterates through potential y values for the potential
# points. Then it tests the value of y to see what orientation the lattice
# is at that point, then randomly selects x values to enter, iterating
# between all the possible x values in the orientation before moving on to
# the next y value.

while(y<size)
if(mod(y,1)==0.5)
x=0.5;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+1;
end
elseif(mod(y,2)==1)
x=0;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+2;
end
else
x=1;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+2;
end
end
y=y+0.5;

end

# The program then enters the two co-ordinate vectors saved previously into
# the scatter function.

hold;
scatter(xvector, yvector);

## How to import matrix from MATLAB? ...

Hi guys,
I want to import symbolic matrix from matlab to Maple, How I can do that ?

## Is there an analog of MATLAB tilde?...

Hey,

I wonder if there is an operator to skip inputs and outputs of functions. Consider this example:

The output would be:

However my system is much bigger and I only need the second output of the command and I dont want to waste memory on the first.

In Matlab I would write

~,ans := GenerateMatrix(...)Is there a similar shortcut availible in Maple?

## Exporting plot data to MATLAB...

Hello all,

I am pretty new to Maple, but I am trying to understand something. I was able to find a numerical solution to a PDE in maple (with some community help, thanks guys!). I am trying to manipulate this data but am struggling with it. I thought if I could take this data to matlab it would be pretty easy for me to manipulate and do what I want.

So my question is: How do I export my numerical solution (pds module) to matlab. Just taking the data is okay. I know you can evaluate the data at some points.

I see there is "Matlab" command that converts code, it doesn't seem to like pds as an input though.

I also see an export matrix command. I guess it could be possible to create a matrix of plot data and convert it this way?

I had to do a change of coordinate system to solve the PDE because of boundary conditions. I'm trying to transform this data back to my regular x,y coordinate system to see if it matches some other simulations.

Thanks in advance! And here is my file.

restart;
with(Physics):
Setup(mathematicalnotation = true):

V(Z, f);

If function ( varphi) is defined, use this one.

PDE1 := subs[inplace](x = xi*varphi(t), PDE1);
If function ( varphi) is defined, use this one.

PDE1 := subs[inplace](t = 2*vartheta*(1/omega), PDE1);

Thesis_Pde2_attempt.mw

 1 2 3 4 5 6 Page 1 of 6
﻿