barnflakes

28 Reputation

2 Badges

15 years, 323 days

MaplePrimes Activity


These are questions asked by barnflakes

How I do this? I've plotted three separate inequalities using the "inequal" command. But now I want these inequalities to be represented on the same graph. For instance, I want to plot say: inequality1 OR inequality 2 OR inequality 3 and see how the three regions/inequalities relate. Any help very much appreciated.

Driving me crazy:

lowest_gradient := proc(a) local i, b, c, gp, gn;

b := Array(1..5):
gp := Array(1..5):
for i from 1 to 5 do:
print(a);
b := a;
b[i] := a[i] + eps1;
gp[i] := b;
end do:
end proc:


d := lowest_gradient(initial_point);

 

If you try the loop for yourself, you will see that it is changing the value of the local variable a each time the loops runs, yet I have no idea why, since I have not put any code which should change the value of a.

 

<p>I have the following code:</p>
<p> </p>
<p> for D5d_counter from 1 to 1000 do<br />
increment := 0.1:<br />
D5d_incr := initial_D5d + increment:<br />
D5d_decr := initial_D5d - increment:<br />
energy_D5d_init := energy1d(initial_D5d);<br />
energy_D5d_incr:= energy1d(D5d_incr);<br />
energy_D5d_decr := energy1d(D5d_decr);<br />
#evalM(cat("plot(",convert(P[1],string), ",",convert(P[2],string), ", '+')"))</p>
Page 1 of 1