## Simulink Component Block Generation...

Hi,

I am trying to convert from MapleSim to Simulink Matlab by using the S-function code Generation connector, but I got the above message when I uploaded the selected subsystem and I have no idea how can I fix it. Please help.

## Non-Dimensionalisation of PDEs...

Hi, please can someone help on how non-dimensionalize PDEs.

I have tried the following, but is not working:

restart:
eqn := (diff(theta(x, z, t), x))^2*(K[1]-K[3])*cos(theta(x, z, t))*sin(theta(x, z, t))+(diff(theta(x, z, t), x))*((diff(theta(x, z, t), z))*(-K[1]*cos(2*theta(x, z, t))+K[3]*cos(2*theta(x, z, t)))-(1/2)*gamma[1]*(4*sin(theta(x, z, t))^2*u(x, z, t)+2*u(x, z, t)*cos(2*theta(x, z, t))))+(diff(theta(x, z, t), z))^2*(K[3]-K[1])*cos(theta(x, z, t))*sin(theta(x, z, t))-(1/2)*gamma[1]*(diff(theta(x, z, t), z))*(4*sin(theta(x, z, t))^2*v(x, z, t)+2*v(x, z, t)*cos(2*theta(x, z, t)))+(diff(theta(x, z, t), z, x))*(-2*K[1]+2*K[3])*cos(theta(x, z, t))*sin(theta(x, z, t))-(diff(u(x, z, t), z))*((1/2)*gamma[2]*cos(2*theta(x, z, t))+(1/2)*gamma[1]*(2*sin(theta(x, z, t))^2+cos(2*theta(x, z, t))))-(diff(v(x, z, t), x))*((1/2)*gamma[2]*cos(2*theta(x, z, t))+(1/2)*gamma[1]*(-2*sin(theta(x, z, t))^2-cos(2*theta(x, z, t))))-(1/2)*gamma[1]*(4*sin(theta(x, z, t))^2*(diff(theta(x, z, t), t))+2*(diff(theta(x, z, t), t))*cos(2*theta(x, z, t)))+((diff(u(x, z, t), x))*gamma[2]-(diff(v(x, z, t), z))*gamma[2])*cos(theta(x, z, t))*sin(theta(x, z, t))+f[2](theta(x, z, t))*(diff(theta(x, z, t), x, x))+f[1](theta(x, z, t))*(diff(theta(x, z, t), z, z));

varchange := {t = T*tau, u = xi*h^2*U/alpha[4], v = xi*h^2*V/alpha[4], x = X*h, z = Z*h, K[3] = K[1]*k[3], f[1] = K[1]*F[1], f[2] = K[1]*F[2], gamma[1] = mu*Gamma[1], gamma[2] = mu*Gamma[2]};

PDEtools:-dchange(varchange, eqn, [tau, U, V, X, Z, k[3], F[1], F[2], GAMMA[1], GAMMA[2]]);

## Can the output of int options be suppressed...

Sometimes this information is not needed. Example

`(Int = int)(1/x, x = a .. 2, 'AllSolutions')`

I had a look at help(interface).

## How do I solve the equation? ...

Hi,
I want to find (w/k)^2 from the following Eq. by Maple. How do I do it?
(u0b, mu,deltab,sigma and A are fixed parameters)

Eq.mw

## How do I verify one value is greater than another ...

Hello everyone,

I am coming from Mathcad Prime wanting to use Maple Flow so I have no underlying knowledge of Maple language.

I just want to simply compare two numerical variables and check whether one is greater than or less than the other.

I have found the verify() function and found that it could not evaluate it, as it results in a "FAIL", however, a simple integer test would correctly test the inequality.

1. Is there another way to test this? What am I missing?  On Mathcad, i just use: Ve>Volcalculated and it would return a 1 or 0

2. Maple flow help (2023) does not really bring up the verify() function, I had to browse through examples and mapleprimes to get to it.  Is there a Maple Flow specific help to search for functions I can use?

Thanks

## How to properly invert and add scale and location ...

Hello community,

Could I please get help on how to invert a probability distribution (reciprocal of) and add the location and scale parameters? The distribution in question is from the built-in (Statistics package) of ChiSquare(n) transformed into a scaled inverse Chi Square with location (shift) parameters.

I have tried the following which results in verified (correct) empirical (sampled) data, but have not been equally successful in the theoretical moments and its quantiles.

 >
 > restart; st:=time():
 > with(Statistics):
 >
 > InvChi2:=proc(a,b,n)         description "inverse chisquare distribution with a=location, b=scale, n=degrees of freedom";         local CHI := RandomVariable(ChiSquare(n)):                  Distribution(                 CDF = unapply(CDF(b*n/CHI+a,t),t),                 PDF = unapply(PDF(b*n/CHI+a,t),t),                 Mean = a+~Mean(b*n/CHI),                 Median = a+~Median(b*n/CHI),                 Variance = simplify(CentralMoment(a+b*n/CHI,2)),                 Skewness = simplify(CentralMoment(b*n/CHI, 3) / CentralMoment(b*n/CHI,2)^(3/2)),                 Kurtosis = simplify(CentralMoment(b*n/CHI, 4) / CentralMoment(b*n/CHI,2)^2),                 Conditions = [b > 0],                 RandomSample = proc(N::nonnegint)                                 a+~Sample(b*n/CHI,N)                         end proc                 );         end proc:
 >
 > T:= RandomVariable(InvChi2(2,4.32,3))
 >
 >
 (1)
 > evalf(Median(T))
 (2)
 > evalf(Mean(T))
 (3)
 > Variance(T)
 (4)
 > Skewness(T)
 (5)
 > Kurtosis(T)
 (6)
 > Quantile(T,.25)
 (7)
 > A:=Sample(T,10^5):
 > Median(A)
 (8)
 > Mean(A)
 (9)
 > Variance(A)
 (10)
 > Skewness(A)
 (11)
 > Quantile(A,.25)
 (12)
 > Quantile(A,.75)
 (13)
 > printf("Time to execute worksheet = %a seconds", time() - st)
 Time to execute worksheet = 2.813 seconds
 >

Thank you

## How to randomly generate a matrix with the given d...

How to randomly generate a matrix with the given determinant?

Many thanks!

## I want to determine the bi values...

Hello everyone
I have this equation (3+2*x+3*x2)n=Sum(bi*xi,i=0..2*n)
I want to determine the bi values for any n in N how to do that ?

I thank you in advance.

## Appears to be a bug rendering a graph...

This isn't particularly complicated. Varying the span generates graphs that are smooth or have an obvious bug. Not sure why.

This also happens if you vary the C_I_CentLim or the C_Inventory. I created this example so it is clearly happening.
The graph gets a sharp jag down, then returns to normal.

Something weird with density of points? I played with it for hours and can't get it to go away.
=============================================
restart;
L := 0;
C_Inventory := 1500;
C_I_CentLim := 0.001;
C_I_StartLim := C_Inventory*C_I_CentLim;
C_InV := Matrix(1000, 3);  # This is so you  can see values created only bobble slightly where the graph has a giant deviation.
iCounter := 0;
P_ScLdt := proc(t) local x, k; global L, C_Inventory, iCounter, C_InV; x := 0; k := 0.08; iCounter := iCounter + 1; L := C_Inventory*C_I_CentLim; x := 4.8 + L/(1 + exp(-k*(t - 2060))) + 0.050; C_InV[iCounter, 1] := L; C_InV[iCounter, 2] := C_Inventory; C_InV[iCounter, 3] := x; if 0 < x then C_Inventory := C_Inventory - x; return x; else return 0; end if; end proc;

# Show results 1800-2100  Problem.
pP_ScLdt := plot('P_ScLdt'(x), x = 1800 .. 2100, linestyle = dash, color = red, thickness = 3, axis = [gridlines = [colour = black, majorlines = 2]], legend = "Pg");

# Re-initialize.
L := 0;
C_Inventory := 1500;
C_I_CentLim := 0.001;
C_I_StartLim := C_Inventory*C_I_CentLim;
C_InV := Matrix(1000, 3);
iCounter := 0;
# Show  that problem happens with a little shorter span
pP_ScLdt := plot('P_ScLdt'(x), x = 1850 .. 2100, linestyle = solid, color = black, thickness = 1, axis = [gridlines = [colour = black, majorlines = 2]], legend = "Pg");

# Re-initialize
L := 0;
C_Inventory := 1500;
C_I_CentLim := 0.001;
C_I_StartLim := C_Inventory*C_I_CentLim;
C_InV := Matrix(1000, 3);
iCounter := 0;
# Show problem goes away with a different interval 1900-2200
pP_ScLdt := plot('P_ScLdt'(x), x = 1900 .. 2200, linestyle = dash, color = blue, thickness = 3, axis = [gridlines = [colour = black, majorlines = 2]], legend = "Pg");

# Re-initialize
L := 0;
C_Inventory := 1500;
C_I_CentLim := 0.001;
C_I_StartLim := C_Inventory*C_I_CentLim;
C_InV := Matrix(1000, 3);
iCounter := 0;
# Enlarge the working interval of 1900-2200 to 1900-2300 and the problem returns, in a different place.
pP_ScLdt := plot('P_ScLdt'(x), x = 1900 .. 2300, linestyle = dash, color = blue, thickness = 3, axis = [gridlines = [colour = black, majorlines = 2]], legend = "Pg");

# Re-initialize
L := 0;
C_Inventory := 2000;
C_I_CentLim := 0.001;
C_I_StartLim := C_Inventory*C_I_CentLim;
C_InV := Matrix(1000, 3);
iCounter := 0;

# Enlarge the interval and it causes a larger set of jaggie deviations.
pP_ScLdt := plot('P_ScLdt'(x), x = 1800 .. 2800, linestyle = solid, color = blue, thickness = 1, axis = [gridlines = [colour = black, majorlines = 2]], legend = "Pg");

## How do I simplify the equation?...

k

∏(2ⁿ-1)

n=1

## How to obtain all cycles in a graph from its cycl...

The following  question I asked a long time ago.

The user Carl Love provided a nice answer regarding the counting of cycles. Back then, I was only interested in the number of cycles, but now I am also interested in finding out these cycles.

I noticed sand15's answer where he (or she) attempted to use the cycle basis to find all cycles. This approach is theoretically viable. However, it seems that his (her) implementation had some instances of missing cycles.  (mmcdara‘s answer is also missing some cycles)

So I brought up this question again to draw attention to it. The only distinction is that I may have specifically mentioned the use of a cycle basis method. Additionally, I may give another question:

• How do we generate all cycles with a specific length (by cycle basis)?

However, I remain open-minded about alternatives that do not involve a cycle basis.

The SageMath approach for that can be referred to the link, which is actually why I remembered this question. It feels like the function in linear algebra that generates all elements through a basis would be effective.

```g=graphs.OctahedralGraph()
def gen_simple_cycles(G):
C = [frozenset(tuple(sorted(e[:2])) for e in c) for c in G.cycle_basis(output='edge')]
for S in Subsets(C):
T = set()
for c in S:
T = T.symmetric_difference(c)
H = Graph(T, format='list_of_edges')
if H.is_eulerian() and max(H.degree(),default=0)==2:
yield H.eulerian_circuit(return_vertices=True)[1]
list(gen_simple_cycles(g))
```

```[[0, 4, 2, 0],
[0, 4, 3, 0],
[0, 4, 5, 1, 0],
[2, 5, 4, 2],
[3, 5, 4, 3],
[0, 3, 1, 0],
[0, 2, 1, 0],
[0, 3, 4, 2, 0],
[0, 2, 4, 5, 1, 0],
[0, 4, 5, 2, 0],
[0, 4, 2, 1, 0],
[0, 3, 4, 5, 1, 0],
[0, 4, 5, 3, 0],
[0, 4, 3, 1, 0],
[0, 4, 2, 5, 1, 0],
[0, 4, 3, 5, 1, 0],
[0, 4, 5, 1, 3, 0],
[0, 4, 5, 1, 2, 0],
[2, 5, 3, 4, 2],
[0, 3, 1, 2, 0],
[0, 3, 4, 5, 2, 0],
[0, 3, 5, 4, 2, 0],
[0, 2, 4, 3, 1, 0],
[0, 3, 4, 2, 1, 0],
[0, 2, 5, 1, 0],
[0, 2, 4, 3, 5, 1, 0],
[0, 3, 1, 5, 4, 2, 0],
[1, 5, 4, 2, 1],
[0, 4, 3, 5, 2, 0],
[0, 4, 5, 2, 1, 0],
[0, 4, 2, 1, 3, 0],
[0, 3, 4, 2, 5, 1, 0],
[0, 3, 5, 1, 0],
[1, 5, 4, 3, 1],
[0, 3, 4, 5, 1, 2, 0],
[0, 4, 2, 5, 3, 0],
[0, 4, 5, 3, 1, 0],
[0, 4, 3, 1, 2, 0],
[0, 4, 2, 5, 1, 3, 0],
[0, 4, 3, 5, 1, 2, 0],
[0, 3, 5, 2, 0],
[0, 2, 5, 4, 3, 1, 0],
[0, 3, 4, 5, 2, 1, 0],
[0, 2, 4, 5, 3, 1, 0],
[0, 3, 5, 4, 2, 1, 0],
[1, 3, 4, 2, 1],
[0, 3, 1, 5, 2, 0],
[1, 5, 2, 1],
[1, 5, 3, 4, 2, 1],
[0, 4, 3, 5, 2, 1, 0],
[0, 4, 5, 2, 1, 3, 0],
[1, 5, 2, 4, 3, 1],
[1, 5, 3, 1],
[0, 3, 5, 1, 2, 0],
[0, 4, 2, 5, 3, 1, 0],
[0, 4, 5, 3, 1, 2, 0],
[0, 4, 3, 1, 5, 2, 0],
[0, 4, 2, 1, 5, 3, 0],
[0, 2, 5, 3, 1, 0],
[0, 3, 5, 2, 1, 0],
[1, 3, 4, 5, 2, 1],
[1, 3, 5, 4, 2, 1],
[1, 3, 5, 2, 1]]```

Total: 63 cycles.

## irrational values in the tickmarks option...

Hi,

I can build my trigonometric circle, but I want to display irrational values ( instead of decimal values) in the tickmarks option. ideas? P.S : My code is quite long, because I wanted to display amplitudes in an optimal way.

## Maple error 2023 old program؟؟؟...

Hi,

I previously wrote and ran a program with Maple 2020, but I deleted Maple 2020 and now I installed 2023, but that program runs with an error.

## how do i solve coupled nonlinear differential equa...

eta/2*diff(f, eta) + (diff(f, eta, eta) + lambda*diff(g, eta)/g)*g^lambda=0,

g*diff(g, eta) + sigma*eta*diff(g, eta)=0,here lambda,sigma positive parameters initial conditions f'(0)=0,g'(0)=0,f' goes to 1 at eta goes to infinity ,g' goes to 1 at eta goes to infinity

can you solve this coupled nonlinear differential equations  using homotopy analysis method

## How to evaluate this integral that way....

I need tutoring on some calculus basics.

 (1)

 (2)

 (3)

 (4)

The right-hand side below is the desired evaluation.

 (5)