Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12083 > unrolled thread

Plot in function

Started byMeike <meike@blub.net>
First post2012-10-17 02:49 +0000
Last post2012-10-17 02:49 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Plot in function Meike <meike@blub.net> - 2012-10-17 02:49 +0000

#12083 — Plot in function

FromMeike <meike@blub.net>
Date2012-10-17 02:49 +0000
SubjectPlot in function
Message-ID<k5l6bs$cmp$1@smc.vnet.net>
I would like to make a function that plots a variable over a parameter range. I tried:

test[f_, sol_] := 
 Table[Plot[
   f /. DeleteCases[sol, i], {i[[1]], 0.9 i[[2]], 1.1 i[[2]]}], {i, 
   sol}]

But this gives the error:

test[x^2 + y^2, {x -> 0, y -> 0}]

During evaluation of In[108]:= Plot::write: Tag Part in i[[1]] is Protected. >>

I see that i cannot define a part in the variable of a plotfunction, but also if I first assign i[[1]] to a variable, I get a problem with the bounds.

test[f_, sol_] := 
 Table[a = i[[1]]; 
  Plot[f /. DeleteCases[sol, i], {a, 0.9 i[[2]], 1.1 i[[2]]}], {i, 
   sol}]

I don't know of a good solution. Thanks in advance.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web