Student Support Forum
-----
Student Support Forum: 'plot wit loop revisited' topicStudent Support Forum > General > Archives > "plot wit loop revisited"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic | Post New Topic
Author Comment/Response
Xavier
05/19/08 00:03am

Hey,

Here is a possibility:

************************************
aa = 1;
bb = 2;
nn = {0, 1, 2, 3, 4, 5, 6};
ll = {0, -7, -8, 10, 12, 200, 4};
functia[B_, nae_, lae_] := 2 B + nae + lae;
pipi = Array[0, {6, 7}];
For[ii = 1, ii <= 6, ii++,
For[jj = 1, jj <= 7, jj++,
nae = Extract[nn, ii];
lae = Extract[ll, jj];
pipi[[ii, jj]] = Evaluate[functia[B, nae, lae]]]];
imagine =
Plot[Evaluate[pipi], {B, 0, 10}, PlotPoints -> 50,
PlotRange -> {{0, 10}, Automatic}]
************************************

The only problems where punctuation issues: don't forget the semi-colons ! Then, the function DO you used does not exist and does not seem necessary.

If the solution you get from the previous code just above is the one you expect, I am glad and you will find another way to get the same result in the enclosed notebook. If not, please let me know more precisely what you want. Don't hesitate to ask if you have any question.
Cheers,

Xavier

Attachment: Plot.nb, URL: http://xroudaut.free.fr,

Subject (listing for 'plot wit loop revisited')
Author Date Posted
plot wit loop revisited roescu 05/08/08 06:03am
Re: plot wit loop revisited Xavier 05/19/08 00:03am
Re: Re: plot wit loop revisited roescu 05/20/08 3:52pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic | Post New Topic





 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: