Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Executing MuPad file in Matlab
Replies: 1   Last Post: May 24, 2013 10:27 AM

 Messages: [ Previous | Next ]
 Steven Lord Posts: 18,038 Registered: 12/7/04
Re: Executing MuPad file in Matlab
Posted: May 24, 2013 10:27 AM

"kamrul " <kamrul126@yahoo.com> wrote in message
news:knn5me\$1m4\$1@newscl01ah.mathworks.com...
> Can anyone please, help me to solve the following problem?
> I wrote the following procedure in MuPad workspace:
>
>
> myProc:=proc(a,b)
> local m, n;
> begin
> m:=a;
> n:=b;
> q:=matrix(m,n):
> myProc:=matrix(m,n):
> for j from 1 to m do
> for i from 1 to n do
> y:=diff((1/(1+0.5*(1-z))^(1/0.5))-z^i,z\$j);
> q[j,i]:=y;
> myProc[j,i]:=subs(q[j,i], z= 0);
> end_for:
> end_for:
> end_proc:
>
> [for a=2 and b=3, results will be:
> myProc= ([[-0.7037037037, 0.2962962963, 0.2962962963],
> [0.2962962963, -1.703703704, 0.2962962963]]) ]
>
> Now, I want to call this procedure in Matlab workspace and evaluate the
> matrix "myProc" for different values of ?a? and ?b?. Can someone please,
> tell me how can I do this in Matlab.

Try the functions listed here:

--
Steve Lord
slord@mathworks.com