Optimizing Interpolation Methods in MATLAB: How to Set and Reset Defaults

  • Thread starter Thread starter myah
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion revolves around optimizing interpolation methods in MATLAB, specifically the challenge of setting and resetting default interpolation functions based on manual comparisons. The user seeks to first manually select the best interpolation methods for their data and then save these selections as defaults for future runs. They are encountering issues with circular logic in their program, which prevents them from effectively implementing this functionality. The request for clarification indicates confusion about the proposed solutions. The focus remains on finding a way to streamline the interpolation process while ensuring optimal results for graph generation.
myah
Messages
1
Reaction score
0
I'm having trouble with my MATLAB program. I have some data, where I've written a program with two options
-to compare the different functions/methods of interpolations and manual choosing of the ones that appear to be closest approximations and then using those methods for interpolation to do make the final graphs
- to skip the manual comparison and use default functions for the interpolations and go straight to the final graph.

My problem comes in that I want to go through the program the first time using the the manual comparison and then be able to set the default as the manually chosen functions, so that next time I run through the mfile, I can just choose the default option and still have the best solutions for each set of data for all of the graphs.

I keep on getting circular logic that doesn't work. Please help.
 
Physics news on Phys.org
What you're saying doesn't make sense to me. Could you post the assignment instead?
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top