hi,
Can you please help me to resolve some issues. I am not able to plot the graph from my fitted model. My dataset is of the form (Cb0,te,Ca}. But I am not able to plot the graph of (Ca (on y axis) Vs te (on x axis) using the fitted model. I am attaching the mathematica file as a reference.
but this does not contain a Va or Vb. This cannot work. This is why in your file you get error messages like:
Part::partd: Part specification $Failed[1] is longer than depth of
object. >> NonlinearModelFit::wtsnn: One or more weight values are not
non-negative numbers. Weight values must be non-negative. >>
The fix is in the reply to your last post. Also I am not sure what you want to plot at the end. As Peter Fleck said, Plot[ListPlot …] does not work. I suppose that you want to plot something like
In the attached notebook, I have again (!) added Va and Vb just like the last time when you asked. The fit now (just like last time) fits a function, but it does not meet the criteria for the tolerances/precision and it also needs to use extrapolation. This is why you still get many error messages. Also because I fixed Va and Vb, the fit is not really good at all. It does, however, plot the two functions.
As far as the graphs are concerned,I will walk through the notebook. My dataset has three values and is of the form {Cb0,te,Ca}.
Now, I have fitted the dataset to the model.
After fitting the dataset, I want to see how closely the data points and the curve from the fitted model fit. In other words i want to see how closely the simulated line passes through the datapoints.
So I plotted first the data points, I choosed Ca on y axis and te on y axis, and plotted the dataset (Plot at the last named"Plot1"). Now I want to draw the simulated curve. I tried but it didnt work (“Plot2”). After getting the simulated plot I just want to see how closely line passes through the point. I have entered the input for it (Show[Plot1,Plot2])
So I am not able to get Plot2, Can you please help me in getting that.
Hi,
I have made some changes as you said, I guess now the it has worked. But I am still unable to get a the graph showing the data points and the curve from the fitted model.
Hello,
I have an issue I’m trying to fit linear piecewise fit into my experimental data to get an approximation.Can anyone assist with a script to do that since I’m new to Mathematica.
Thank you.
Oku Nyong: I would suggest that you start a new thread (new subject header and all that) and also include some reasonable example It could be in an attached file if it seems too long to enter directly in the post. It would be best if you also provide the mathematica code you have tried thus far.
Also you might want to look at the documentation for, say, NonlinearModelFit (accessed via Help > Documentation Center).