@Liam Aren't you probably attempting to do (whatever it is you are trying to do these days) something that exceeds your Mathematica knowledge by too much? Perhaps you should start with simpler challenges?
All symbols belong to a context and there's nothing you can do about it. A different story is how they show up
@Rojo Easy challenges, that's no fun. ;) I have a final goal in mind and I simple working through the issues as they come. I managed to came up with a working answer. ;) I do sometimes wonder if there might be a better solution in cases like the one above.
@Rojo I am happy to explain what I am ultimately trying to do, to see if you know a better a technique. You see I am working through issues as they appear. Yes I don't agree with everything but I mean if it works.
Quick and dirty: ToExpression[ StringReplace[ToString[P`y[P`y[P`a P`b]], InputForm], "P`" -> ""]]
@Rojo The FrontEnd sometimes generates $$CellContext` contexts and if you want to manipulate generated notebooks programmatically this can drive you nuts ...
I wished the FrontEnd actions w.r.t to context (generation) would be documented. Probably too time consuming (or did I overlook it?)
The only way to call a function/variable in a package without using the full context is to make it public, which is typically done with usage messages immediately after the BeginPackage["Package`"] and before Begin["Private`"].
To me, it seems like you just want to be able to view the definition...
I want to delete the string representing the context of a symbol.
For info I need such a functionality in my ShowIt function defined here
I'd like to know how I can replace such a string with a rule so that for example,
"MyFunc[ShowIt[Q1`Private`var1$123], ShowIt[Q2`Private`var2$456], 0., 1.]"...
@MichaelE2 I guess I missed you again... In any case, I wanted to ask if you answered (or recall) a question on plotting stream lines if given the direction of the stream at each grid point. That's sounds like something you or Jens would've answered
@rm-rf I was going to ask you some more questions about what we were discussing yesterday, but I'll post it as a new question instead. I think it is worth it ;)
One can do what you ask, but you might prefer to follow the advice of @Jens. Here's how, anyway. First, I made up some data for a similar potential function.
data = Table[10 + (3 ((20 - j)^2 - (j + 5)^2))/(75 + (i - 10)^2 + 2 (j - 10)^2),
{j, 0, 20}, {i, 0, 20}];
f = ListInterpolation[dat...
@MichaelE2 The problem is that it's not a field... well, the underlying process is, but the data is only for the dominant direction, so there's large swathes of constant direction and others that are more messy and discontinuous
@MichaelE2 That's a much better suggestion than anything I've tried! But LSP complains that it's not a valid vector field
(it isn't)
Thanks though, I'll try some caveman techniques which might be faster to code up... this is rather a small detail that would've embellished the plot, but I can live without it :)
@Sosi Is 1/cond1a+cond1b+cond1c+cond2a+1/cond2b+cond2c your actual objective function or something you just used? Is your actual goal to find any k1, k2 that will satisfy your constraints? If so you could just use a dummy obj. fun
I am making a new demo on finite differences, here is what it will do: 1. select function to approximates its derivatives(s), supports up to 4th. 2) select from menu either centered, forward or backward, 3) select point x to expand around, 4) select how small to make h. Then the demo will generate table of approximations, the finite difference formula itself, and other plots..... Am I missing something more to make this more useful?
The menu will have few pre-defined functions (like sin(x), etc...) since it is not possible to allow user to type in their own function. Will try to include few interesting ones. The order of finite difference can be up to 9. This is more than anyone will ever need.