Joe Riel

9660 Reputation

23 Badges

20 years, 22 days

MaplePrimes Activity


These are replies submitted by Joe Riel

Increase the number of points in the plot:

plots:-implicitplot(eq2, x=-1..1, y=-1..1,numpoints=1000);

Increase the number of points in the plot:

plots:-implicitplot(eq2, x=-1..1, y=-1..1,numpoints=1000);

I'd use a mesh analysis, that requires only four equations:

eqs := {NULL
        , R2*M1 + R1*(M1-M2) + R3*(M1-M3)
        , R1*(M2-M1) + V1 + R5*M2 + R6*(M2-M4) + R4*(M2-M3)
        , R3*(M3-M1) + R4*(M3-M2) + R7*(M3-M4) - V2 +R10*M3
        , R6*(M4-M2) + R8*M4 + R9*M4 + R7*(M4-M3)
       };

sol := solve(eqs,{M1,M2,M3,M4});

To solve for a particular current in a branch, express it in terms of the meshes. For example,

I5 = M3 - M2:
To get numerical values, create a set of equations for the parameters, and substitute them in, along with the solution:
params := {R1 = 5, R2 = 200, ... }:
subs(sol, params, M3-M2);

I'd use a mesh analysis, that requires only four equations:

eqs := {NULL
        , R2*M1 + R1*(M1-M2) + R3*(M1-M3)
        , R1*(M2-M1) + V1 + R5*M2 + R6*(M2-M4) + R4*(M2-M3)
        , R3*(M3-M1) + R4*(M3-M2) + R7*(M3-M4) - V2 +R10*M3
        , R6*(M4-M2) + R8*M4 + R9*M4 + R7*(M4-M3)
       };

sol := solve(eqs,{M1,M2,M3,M4});

To solve for a particular current in a branch, express it in terms of the meshes. For example,

I5 = M3 - M2:
To get numerical values, create a set of equations for the parameters, and substitute them in, along with the solution:
params := {R1 = 5, R2 = 200, ... }:
subs(sol, params, M3-M2);

In that case, here is what I was hinting at:

OddEven := proc(L::list)
local i;
     [seq(L[i],i=1..nops(L),2), seq(L[i],i=2..nops(L),2)];
end proc:

In that case, here is what I was hinting at:

OddEven := proc(L::list)
local i;
     [seq(L[i],i=1..nops(L),2), seq(L[i],i=2..nops(L),2)];
end proc:

Use Array, not array.  The latter is an older data-structure (related to tables).  The reason that the new one works is that any unassigned elements are automatically zeroed.

Use Array, not array.  The latter is an older data-structure (related to tables).  The reason that the new one works is that any unassigned elements are automatically zeroed.

This can also be done nicely with frontend:

frontend(collect,[eq1,x^(r+1),factor]);
                                             (r + 1)        2
                                          2 x        (r - 1)
                                        - -------------------
                                                     2  2
                                              (r - 2)  r

This can also be done nicely with frontend:

frontend(collect,[eq1,x^(r+1),factor]);
                                             (r + 1)        2
                                          2 x        (r - 1)
                                        - -------------------
                                                     2  2
                                              (r - 2)  r

I meant the optional third argument to the procedure seq. For example,
L := [seq(1..10)];         
                                L := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

seq(L[i], i=1..nops(L), 3);
                                              1, 4, 7, 10

seq(L[i], i=2..nops(L), 3); 
                                                2, 5, 8


I meant the optional third argument to the procedure seq. For example,
L := [seq(1..10)];         
                                L := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

seq(L[i], i=1..nops(L), 3);
                                              1, 4, 7, 10

seq(L[i], i=2..nops(L), 3); 
                                                2, 5, 8


A "cleaner" way to create the list of variables directly (i.e. without, say, indets) is

vars := [cat(``,"a".."p")];

A "cleaner" way to create the list of variables directly (i.e. without, say, indets) is

vars := [cat(``,"a".."p")];
First 130 131 132 133 134 135 136 Last Page 132 of 195