Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi! For a process control exercise I'm trying to obtain the coefficients of different powers of the variable to design a PID controller. I have obtained the following equation :

Gc := (s^2*t^2+2*s*t*x+1)*(-b*s+1)/(k(-b*s+1)*s(tc+b))

 

I want to simplify it into an equation of the following form :

Gc = a( 1 + 1/(b*s) + c*s )

where a, b and c would be determined by Maple from the previous equation. I've tried using simplify() expand(simplify()) in different ways from the documentation and other threads, but to no avail. Any help would be greatly appreciated!

 

Thanks a lot!

Antoine.

Hello all,

I'm trying to do kinetic modeling of sequential dissociations with DE. I'm hitting a snag when modeling the third dissociation. The population should start at zero at t=0, but some of my model functions are non-zero at t=0. Is there anyway to fix this to force the funtions to go through zero?

Scheme:
PPPP -> intermediates -> PPP -> intermediates -> PP -> intermediates -> P  
(where P is a subunit and intermediates are confirmational changes before dissociation of a subunit)

a'..d' is the first dissociation
e' is the second dissociation
f'..l' is the third dissociation
Fits are evaluated by the residual sum of squares.

sol := dsolve([a' = -k1*a(x), b' = k1*a(x)-k1*b(x), c' = k1*b(x)-k1*c(x), d' = k1*c(x)-k1*d(x),
e' = k1*d(x)-k2*e(x), 
f' = k2*e(x)-k3*f(x), g' = k3*f(x)-k3*g(x), h' = k3*g(x)-k3*h(x), i' = k3*h(x)-k3*i(x), j' = k3*i(x)-k3*j(x), k' = k3*j(x)-k3*k(x), l' = k3*k(x)-k3*l(x), 
a(0) = 1, b(0) = 0, c(0) = 0, d(0) = 0, e(0) = 0, f(0) = 0, g(0) = 0, h(0) = 0, i(0) = 0, j(0) = 0, k(0) = 0, l(0) = 0],
{a(x), b(x), c(x), d(x), e(x), f(x), g(x), h(x), i(x), j(x), k(x), l(x)}, method = laplace);

f1 := sol[6];
f1 := rhs(f1);
g1 := sol[7];
g1 := rhs(g1);
h1 := sol[8];
h1 := rhs(h1);
i1 := sol[9];
i1 := rhs(i1);
j1 := sol[10];
j1 := rhs(j1);
kk := sol[11];
kk := rhs(kk);
l1 := sol[12];
l1 := rhs(l1);

xdata := Vector([0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400], datatype = float);
ydata := Vector([0.0034,0.00392,0.00184,0.00782,0.01873,0.03683,0.11016,0.09838,0.18402,0.24727,0.20901,0.2972,0.37635,0.49235,0.57845,0.4457,0.50285,0.5672,0.62783,0.57264,0.54918,0.44792,0.49795,0.55218,0.47512,0.46473,0.37989,0.32236,0.3323,0.20894,0.28473,0.21273,0.19855,0.13548,0.12725,0.13277,0.0784,0.07969,0.06162,0.03855], datatype = float);

k1 := 0.391491454107626e-1; 
k2 := 0.222503562261129e-1; 


z1:=f1;
z2:=f1+g1;
z3:=f1+g1+h1;
z4:=f1+g1+h1+i1;
z5:=f1+g1+h1+i1+j1;
z6:=f1+g1+h1+i1+j1+kk;
z7:=f1+g1+h1+i1+j1+kk+l1;

Statistics[NonlinearFit](z1,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z1,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z2,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z2,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z3,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z3,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z4,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z4,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z5,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z5,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z6,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z6,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

Statistics[NonlinearFit](z7,xdata, ydata, x, initialvalues = [k3=0.1], output = [parametervalues, residualsumofsquares]); 
A:=plot(xdata, ydata, style=point, symbol=solidcircle, color=blue, symbolsize=12,labels = ["time (minutes)", "Relative Abundance"], labeldirections = [horizontal, vertical]):
F:=Statistics[NonlinearFit](z7,xdata, ydata, x,initialvalues = [k3=0.1]):
B:=plot(F, x=xdata[1]..xdata[-1], color=red):
plots[display](A, B);

3rd_diss.mw

Hi,

I have a private license of Maple 2018, and am interested in advances in terms of tensor calculus in Maple 2019, in particular concerning applications in general relativity. Three questions:

(1) Is there a way for me to buy the package without having to buy Maple 2019 in full, or would I have to upgrade?

(2) I have seen in the preview video that the features can for instance calculate the Christoffel symbols, the Rieman tensor, etc., from a prescribed metric in a coordinate basis, correct? Can the formalism also handle Expressions expressed in a non-coordinate frame though? So a frame field, for which the commutaror of the basis vector fields does not vanish?

(3) Is there somewhere a nice documentation, with exaples, where I can read on what I can do with the package? The documentation in the "what's new" section on the website is mainly concerned with applications for quantum mechanics, which is not what I am interested in.

Cheers!

If I create  and save a worksheet in Maple 2019, then try to up load it here, it uploads but contents won't display

No issue if I have an "identical" worksheet in Maple 2018.

See the attachment attempts below

#### Result of trying to upload Maple 2019 file here


Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/fibon2019.mw .
 

Download fibon2019.mw

But "same" file from Maple 2018 "works"

#
# Recursive Fibonacci generator
#
  myFib:= proc(n::integer)
               option remember;
               if   n=1
               then return 1
               elif n=0
               then return 0
               else return myFib(n-1)+myFib(n-2):
               fi:
          end proc:

  seq(myFib(j), j=0..20);

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765

(1)

 


 

Download fibon2018.mw

Hello,

I have a matrix of size m*n and I want to apply a procedure "f" to each entry of the matrix. But I want to do this in parallel to reduce the computation time.

I used: Matrix(n, m, (i,j) -> Grid:-Seq( f (M (i,j) ) ,i=1..n, j=1..m) ); 

but I'm not satisfied with the result, I want the calculation to be faster. Are there any other methods?

Dear All,

Gretting from me. I have faced a problem in Maple program due to some errors. Could you please help me about the solution of that problem?
Thanks

@Preben Alsholm
@tomleslie
Sourse File: solution.mw

I've always had problems installing Physics package from inside Maple.

I thought by buying Maple 2019 this problem will go away, but I am still not able to install this package.

I get this error

Fetching package "Physics Updates" from MapleCloud...
ID: 5137472255164416
Version: 326
URL: https://maple.cloud

File size is 10764288 bytes(10 MB). 

Installing package...
PackageTools:-Install("C:/Users/me/AppData/Local/Temp/cloudDownload3648614516733692025/Physics+Updates.maple",overwrite=true,pkgname="Physics Updates");

ERROR: The package could not be installed.
error PackageTools:-Install, "this package is intended to work 
with Maple %1; it can not be installed in the version you 
are using -- %2", "2018", "2019"

Here is screen shot

 

I am on windows 10 professional. Maple 2019 installed with no problems.

 

any suggestion to try (other what was suggeted in link at top, which is to manually download the physics package each time and update maple.ini to point to the new version)?

Is Physics package updated to work/install in Maple 2019 or does one need to wait few more days untill this happens?

I cant get the error. Any one can help me?

restart;
with(plots);
r := 0.5e-2; k := 10000; a := .4; alpha := .25; epsilon := 0.2e-1; mu := 0.4e-1; delta := 0.3e-2; Lambda := 0.2e-1;
beta[2] := .45; beta[1] := .2; c[1] := 2; c[2] := 5; w[1] := 10; w[2] := 30; T := 3;
u[1] := min(max(0, z), 1); z := beta[2]*s(t)*i(t)*(lambda[2](t)-lambda[1](t))/(w[1]*(s(t)+i(t)+e(t))); u[2] := min(max(0, c), 1); c := (beta[1]*s(t)*p(t).(lambda[2](t)-lambda[1](t)))/(w[2]*(a+p(t)))+(lambda[2](t).e(t)+(i(t)+alpha.e(t)).lambda[3](t)-(gamma.i(t)+p(t)).lambda[4](t))/w[2]; 

sys := diff(s(t), t) = r*s(t)*(1-(s(t)+i(t)+e(t))/k)-beta[1]*s(t)*p(t)*(1-u[2])/(a+p(t))-beta[2]*s(t)*i(t)*(1-u[1])/(s(t)+i(t)+e(t)), diff(e(t), t) = beta[1]*s(t)*p(t)*(1-u[2])/(a+p(t))+beta[2]*s(t)*i(t)*(1-u[1])/(s(t)+i(t)+e(t))-(mu+alpha+u[2])*e(t), diff(i(t), t) = (alpha+u[2]).e(t)-(mu+epsilon+u[2])*i(t), diff(p(t), t) = Lambda+(epsilon+u[2]).i(t)-delta*p(t), diff(lambda[1](t), t) = -lambda[1](t)*(r*(1-(2*s(t)+i(t)+e(t))/k)-beta[1]*p(t)*(1-u[2])/(a+p(t))-beta[2]*i(t)*(1-u[1])/(s(t)+i(t)+e(t)))-lambda[2](t).(beta[1]*p(t)*(1-u[2])/(a+p(t))-beta[2]*i(t)*(1-u[1])/(s(t)+i(t)+e(t))), diff(lambda[2](t), t) = -c[1]+lambda[1](t)*r*s(t)/k+lambda[2](t)*(mu+alpha+u[2])-(1-u[2]).alpha.lambda[3](t), diff(lambda[3](t), t) = -c[2]+lambda[1](t).(r*s(t)/k+beta[2]*s(t)*(1-u[1])/(s(t)+i(t)+e(t)))-lambda[2](t)*beta[2]*s(t)*(1-u[1])/(s(t)+i(t)+e(t))+lambda[3](t)*(u[2]+mu+gamma)-lambda[4](t).gamma.(1-u[2]), diff(lambda[4](t), t) = ((lambda[1](t).beta[1])*s(t).a.(1-u[2]))/(a+p(t))^2-((lambda[2](t).beta[1])*s(t).a.(1-u[2]))/(a+p(t))^2-lambda[4](t)*(delta+u[2]), s(0) = 1000, e(0) = 10, i(0) = 0, p(0) = 100, lambda[1](T) = 0, lambda[2](T) = 0, lambda[3](T) = 0, lambda[4](T);
p1 := dsolve({sys}, type = numeric, abserr = 0.1e-3, maxmesh = 2400);
Error, (in fproc) unable to store '-1.*HFloat(0.0)[1]' when datatype=float[8]
p2o := odeplot(p1, [t, i(t)], 0 .. 2, numpoints = 100, labels = ["Time (months)", " infectious "*`Maize"`], labeldirections = [horizontal, vertical], style = line, color = red, axes = boxed);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution
 

Example of Duffing equation with boundary conditions.
y'' + 0.2y' + y^3 - 0.3cos(s) = 0;
y(0) = y (2Pi);
y'(0) = y'(2Pi);
For convenience, we replace the original equation with a system of two first order equations:
--------------------------------------------------------------------------
x1'(t) = 2*Pi*x2(t);
x2'(t) = - 0.4*Pi*x2(t) - 2*Pi*x1(t)^3 +0.6*Pi*cos(2*Pi*t);
x1(0) = x1(1);
x2(0) = x2(1);
--------------------------------------------------------------------------
I have long wanted to apply an optimization package to solve a boundary value problem for ODE. The decision helped procedure for solving ODE, written by forum member vv.
It seems to me that two solutions have been found and that the solutions are weakly sensitive to the initial approximations. These are two closed trajectories. For example, these are points that belong to these solutions:
(0.5966963,  1.0482816) , ( - 0.3132584, 0.0664941).
I am wondering: are the solutions right, and how justified is the use of optimization methods for such tasks?
At the end of the program, the solution is checked on the original Duffing equation using standard Maple functions.   Duffing_equation_BC.mw

(In the figures, the trajectory bypass occurs three times.)

For some reason when I do n mod 2, it spits out n. Im trying to figure out what is wrong. I have to evaluate at two points in order for this to work. modulo.mw

 

Thanks

 

Last year, I read a fascinating paper that presented evidence of an exoplanet, inferred through the “wobble” (or radial velocity) of the star it orbits, HD 3651. A periodogram of the radial velocity revealed the orbital period of the exoplanet – about 62.2 days.

I found the experimental data and attempted to reproduce the periodogram. However, the data was irregularly sampled, as is most astronomical data. This meant I couldn’t use the standard Fourier-based tools from the signal processing package.

I started hunting for the techniques used in the spectral analysis of irregularly sampled data, and found that the Lomb Scargle approach was often used for astronomical data. I threw together some simple prototype code and successfully reproduced the periodogram in the paper.

 

After some (not so) gentle prodding, Erik Postma’s team wrote their own, far faster and far more robust, implementation.

This new functionality makes its debut in Maple 2019.

From a simple germ of an idea, to a finished, robust, fully documented product that we can put in front of our users – that, for me, is incredibly satisfying.

That’s a minor story about a niche I’m interested in, but these stories are repeated time and time again.  Ideas spring from users and from those that work at Maplesoft. They’re filtered to a manageable set that we can work on. Some projects reach completion in under a year, while other, more ambitious, projects take longer.

The result is software developed by passionate people invested in their work, and used by passionate people in universities, industry and at home.

We always pack a lot into each release. Maple 2019 contains improvements for the most commonly used Maple functions that nearly everyone uses – such as solve, simplify and int – as well features that target specific groups (such as those that share my interest in signal processing!)

I’d like to to highlight a few new of the new features that I find particularly impressive, or have just caught my eye because they’re cool.

Of course, this is only a small selection of the shiny new stuff – everything is described in detail on the Maplesoft website.

Edgardo, research fellow at Maplesoft, recently sent me a recent independent comparison of Maple’s PDE solver versus those in Mathematica (in case you’re not aware, he’s the senior developer for that function). He was excited – this test suite demonstrated that Maple was far ahead of its closest competitor, both in the number of PDEs solved, and the time taken to return those solutions.

He’s spent another release cycle working on pdsolve – it’s now more powerful than before. Here’s a PDE that Maple now successfully solves.

Maplesoft tracks visits to our online help pages - simplify is well-inside the top-ten most visited pages. It’s one of those core functions that nearly everyone uses.

For this release, R&D has made many improvements to simplify. For example, Maple 2019 better simplifies expressions that contain powers, exponentials and trig functions.

Everyone who touches Maple uses the same programming language. You could be an engineer that’s batch processing some data, or a mathematical researcher prototyping a new algorithm – everyone codes in the same language.

Maple now supports C-style increment, decrement, and assignment operators, giving you more concise code.

We’ve made a number of improvements to the interface, including a redesigned start page. My favorite is the display of large data structures (or rtables).

You now see the header (that is, the top-left) of the data structure.

For an audio file, you see useful information about its contents.

I enjoy creating new and different types of visualizations using Maple's sandbox of flexible plots and plotting primitives.

Here’s a new feature that I’ll use regularly: given a name (and optionally a modifier), polygonbyname draws a variety of shapes.

In other breaking news, I now know what a Reuleaux hexagon looks like.

Since I can’t resist talking about another signal processing feature, FindPeakPoints locates the local peaks or valleys of a 1D data set. Several options let you filter out spurious peaks or valleys

I’ve used this new function to find the fundamental frequencies and harmonics of a violin note from its periodogram.

Speaking of passionate developers who are devoted to their work, Edgardo has written a new e-book that teaches you how to use tensor computations using Physics. You get this e-book when you install Maple 2019.

The new LeastTrimmedSquares command fits data to an equation while not being signficantly influenced by outliers.

In this example, we:

  • Artifically generate a noisy data set with a few outliers, but with the underlying trend Y =5 X + 50
  • Fit straight lines using CurveFitting:-LeastSquares and Statistics:-LeastTrimmedSquares

LeastTrimmedSquares function correctly predicts the underlying trend.

We try to make every release faster and more efficient. We sometimes target key changes in the core infrastructure that benefit all users (such as the parallel garbage collector in Maple 17). Other times, we focus on specific functions.

For this release, I’m particularly impressed by this improved benchmark for factor, in which we’re factoring a sparse multivariate polynomial.

On my laptop, Maple 2018 takes 4.2 seconds to compute and consumes 0.92 GiB of memory.

Maple 2019 takes a mere 0.27 seconds, and only needs 45 MiB of memory!

I’m a visualization nut, and I always get a vicarious thrill when I see a shiny new plot, or a well-presented application.

I was immediately drawn to this new Maple 2019 app – it illustrates the transition between day and night on a world map. You can even change the projection used to generate the map. Shiny!

 

So that’s my pick of the top new features in Maple 2019. Everyone here at Maplesoft would love to hear your comments!

Hello,

I have a problem in the solution of this system of ODEs:

de[1] := M*(diff(x(t), t, t))+sum(FxjR, j = 1 .. m)+sum(FxjL, j = 1 .. m) = M*g+Us*omIn^2*cos(omIn*t); ini[1] := x(10^(-6)) = 1.00013081730872*10^(-6); ini[2] := (D(x))(10^(-6)) = 0.261632327671976e-3;


de[2] := M*(diff(y(t), t, t))+sum(FyjR, j = 1 .. m)+sum(FyjL, j = 1 .. m) = Us*omIn^2*sin(omIn*t); ini[3] := y(10^(-6)) = 9.99989124246935*10^(-8); ini[4] := (D(y))(10^(-6)) = -2.50318090194868*10^(-6);


de[3] := M*(diff(z(t), t, t))+sum(FzjR, j = 1 .. m)+sum(FzjL, j = 1 .. m) = 0; ini[5] := z(10^(-6)) = 9.99065455347471*10^(-9); ini[6] := (D(z))(10^(-6)) = -0.186933812655399e-4;


de[4] := Ix*(diff(thx(t), t, t))+Iz*(diff(thy(t), t))*omIn+sum(MxjL, j = 1 .. m)-sum(MxjR, j = 1 .. m) = 0; ini[7] := thx(10^(-6)) = 8.60546055625759*10^(-7); ini[8] := (D(thx))(10^(-6)) = 1.72109307183424;


de[5] := Iy*(diff(thy(t), t, t))-Iz*(diff(thx(t), t))*omIn+sum(MyjL, j = 1 .. m)-sum(MyjR, j = 1 .. m) = 0; ini[9] := thy(10^(-6)) = 1.02142988540396*10^(-10); ini[10] := (D(thy))(10^(-6)) = 0.285764338010142e-3;
 

sys_ode := seq(de[n], n = 1 .. 5);
ICs := seq(ini[n], n = 1 .. 10);
F := dsolve([sys_ode, ICs], type = numeric, range = 10^(-6) .. 0.1);
 

Then I found this response:

Warning, cannot evaluate the solution further right of .10473416e-4, probably a singularity
F:=proc(x_rkf45) ... end proc

 

The details of the parameters inside the SUMMATION sign are very complicated and it is useless to mention them (in my point of view). Each one of (FxjR) and its similars is more than 20 Word pages, so it is useless to mention, but I can confirm that all of them include the (time and the 5 variables of ODE and their first derivatives only).

How can I solve that?
Any ideas to get rid of this singularity problem?

I am thinking of using a fixed step method, but I do not know if this will solve the problem? Also, I do not know how can I use a fixed step and what are the methods that use fixed step in maple?

Your participations are greatly appreciated! 

 

 

 

 

I am trying to write a code to calculate, for a given prime p the string length k of the repunit

R_k=1111111....1111 (with k 1s) such that the number R_kpR_k is prime.  

Example: If p=59, then k=42 is the smallest k such that R_k59R_k is prime. Note that for some primes it can be shown that no such k exists (2,11,37,101..)

I can usually figure out from the factor cycle of a “repunit wrapped” prime whether such a k exists or not. But if the indications are that a k does exist then finding it is very time consuming. Eg for p =71, 167. 

 

What i want to do, for given p is set an upper limit N for k then check to see if R_kpR_k is prime for values of k from 1 to N

The bit I can’t handle is expressing the “wrapped” number for a given p and k, and also indexing from k to k+1, until N is reached or a prime found.

Any assistance gratefully received.

Best regards

David.

 

 

 

 

 

If worksheet execution was started and computer is locked before execution ends, Maple will stop responding and all work is lost. Execution of whole worksheet takes very long time, sometimes over 3 hours, so "do not lock computer during execution" is not solving the problem.

Dear All,
Perhaps my question is basic question, but I want to know more about LPSolve
Is it possible to join 2 solutions from different LPSolve?

For example, I have 2 solutions,
Sol[1] := [72.011122301, [t[4] = -.500000000000000, t[13] = .500000000000000, x[1, 4] = 1, x[1, 13] = 0, x[4, 1] = 0, x[4, 13] = 1, x[13, 1] = 1, x[13, 4] = 0]];
Sol[2] := [53.128387340, [t[6] = -2.00000000000000, t[7] = 0., t[8] = -.999999999999999, x[1, 6] = 1, x[1, 7] = 0, x[1, 8] = 0, x[6, 1] = 0, x[6, 7] = 0, x[6, 8] = 1, x[7, 1] = 1, x[7, 6] = 0, x[7, 8] = 0, x[8, 1] = 0, x[8, 6] = 0, x[8, 7] = 1]].

What I want to achieve is following:

(1) eliminating t variable and join those solution (all values of x). Thus, I got [ x[1, 4] = 1, x[1, 13] = 0, x[4, 1] = 0, x[4, 13] = 1, x[13, 1] = 1, x[13, 4] = 0,x[1, 6] = 1, x[1, 7] = 0, x[1, 8] = 0, x[6, 1] = 0, x[6, 7] = 0, x[6, 8] = 1, x[7, 1] = 1, x[7, 6] = 0, x[7, 8] = 0, x[8, 1] = 0, x[8, 6] = 0, x[8, 7] = 1]].
(2) Extracting the value of X. I know that sol[1][2] indicates the values of right hand side. But I want to get the value of each of x in sequence.
for example: I can get x[1,2]=1, x[1,8]=0, x[7,1]=0 and so on.
In this case, Maybe I can use
eval(x[1,8],sol[1]) for specific x.
But is there any nice way to get all values of x with some procedures?
 

Thanks for reading

 

1 2 3 4 5 6 7 Last Page 2 of 1519