I am trying to curve fit some periodical experimental data, and discovered that the methods that work for curve-fitting to other functions do not work for trigonometric ones--at least--the way I am doing it.
Here is my code:
falseData = Table[{x, N[3*Sin[4*x]]}, {x, 10}];
model = a*Sin[b*x];
fi...
I'm having trouble with a non-linear fit:
fit = NonlinearModelFit[data,
y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x]
where data has about 15 thousand points and looks like this:
The data can be downloaded here.
Mathematica gives the following adjusted parameters:
{y0 -> 30.4428, ...
Here's my current puzzle: test[a: (_ | {__} )]:={a} functions as you expect, but changing it to test[a: (b_ | {__})] := {a} no longer does; test remains unevaluated.
The Treachery of Images (La trahison des images, 1928–29, sometimes translated as The Treason of Images) is a painting by the Belgian René Magritte, painted when Magritte was 30 years old. The picture shows a pipe. Below it, Magritte painted, "Ceci n'est pas une pipe" (), French for "This is not a pipe." The painting is not a pipe, but rather an image of a pipe, which was Magritte's point:
The famous pipe. How people reproached me for it! And yet, could you stuff my pipe? No, it's just a representation, is it not? So if I had written on my picture "This is a pipe," I'd have been ly...
the part I'm trying to get running is where I can compare auxillary data (i.e. the data passed into DataListPlot is a tuple like in ErrorListPlot) across data sets, and use that info to change how each point is plotted.
The difficulty they're having over on th-phys is attracting a number of different specialties, in addition to having people feel comfortable enough to post.
@CHM A dot product is $a^i b_i$, but $a^i$ is the dual of $a_i$, and in Cartesian space this has the same entries as $a^i$. But, this isn't always the case, like in QM where the dual is the complex conjugate. For non-Cartesian spaces, the difference becomes more dramatic.
Also, $a_i b_i$ defines a 2$^\text{nd}$ rank tensor (matrix) in "real" space while $a^i b^i$ does the same thing in the dual space.
@CHM He answered 13 questions today. Compare that to my 44 in the 76 days we've been in beta. He's a machine, probably from the future. Or, a collective organism like Mr.W.
@rcollyer I think the reason theophys has so many unanaswered questions is that the scope is way too broad; some question are nice but would require one to sit down for a few hours to do a calculation to answer; others are more philosophy; and so on.
@acl I agree with you on this one; there are not many questions there that I can say I fully understand, a few for which I could provide a high-quality answer
so, unless the userbase is large enough to have at least two or three frequent users in each specialized field, it will not really work
currently, it's mostly “Q field theory and relativity”.SE
@Heike We've got the top 2 hot questions, so I'm not surprised we're on the front page. But, yeah something bad is probably going to happen ... watch it will rain poor questions down on our heads. :)
@rcollyer thanks, it looks pretty good. I'm still trying to understand some of the details (which I believe is domain specific). Am I right in understanding that PlotMarkerFunction is the crux to plotting it the way you want it?
It doesn't have a "default" behavior — what should I expect if I input just a matrix to it, without specifying any relationships?
Part::partw: Part 1 of {} does not exist. >>
Part::partw: Part 2 of {} does not exist. >>
Part::take: Cannot take positions 3 through -1 in {}. >>
ComparisonFunction::typearg: Comparison function {}[[1]] does not exist. Aborting.
It's dying inside makeMarkerFunction. stdform[globals] is supposed to put everything in standard form, except without any "Globals" specified, there won't be any.
Also, need to fix that damned message ...
@RM Add the line stdform[{}]:={} just after the other definitions of stdform. It clears up the problem.
@RM yes, the example is very domain specific. I'm plotting which one is the ground state, i.e. lowest energy. I just have to put together an example, now, of ErrorListPlot built on top of DataListPlot to complete the demo. :)
@EliLansey Thanks. It's not as bulletproof as it needs to be, yet, but it is getting there. My plan is to re-implement ErrorListPlot on top of it just to show that it can be done. :)
actually, I felt so unproductive at work today I left early and spent the end of the afternoon donating blood just to feel like I could contribute to something!
@Heike I agree. I don't think we quite have the depth of users needed. We're going to get there, and relatively quickly compared to other sites. But, we're not there, yet.