Adding a scrollbar to change a graph

2 visualizaciones (últimos 30 días)
Guillermo Lopez
Guillermo Lopez el 30 de En. de 2012
Hello. I've finally managed to finish my program and the result is a graph with x axis representing a thickness and y axis representing contrast. The graph changes depending on the value I give a variable (let's call it n) obtaining like this different curves every time I change that value. The variable n can be ANY number (and even has an imaginary part to it). I need to insert the numbers one by one, trying with different random numbers to obtain a curve which is exactly like the one I obtained experimentally. This allows us to calculate by using a theoretical model the value of variable n. It is very tiring to insert a different number each time, and having to run the program time after time, and hence my question: -Is there any way to actually insert a scrollbar which when moved, will also change the value of variable n, and hence change my graph?- Could I for example give it a list of say 1million values, allowing me the scroll bar to change between them ONLY? Thank you in advance as every day I learn many things with your help.

Respuesta aceptada

Jan
Jan el 30 de En. de 2012
Trying to define 1 million numbers by moving a scrollbar is a really strange task. Please note, that the monitor has less than 1 million pixels in a certain direction, which impedes the selection drastically.
Actually the problem sounds like a programatical approach is much better. Are you sure that choosing random numbers is sufficient? Or would a parameter optimization find the solution much faster, more reliably and most of all reproducibly?
  2 comentarios
Guillermo Lopez
Guillermo Lopez el 30 de En. de 2012
Ok might be one million values is quite a lot! The thing is I might do two different bars which I can move...one would be for the real part of the n value, and another bar would change the imaginary part of the value. This way I could probably have values from 1 to 20 for the real part and values from 0.001 to 10.000 for the imaginary part. The thing is, I like the scroll idea because that would allow me to change the values and see how the curve changes by altering the real or imaginary part...and hence would allow me to fit the theoretical curve much easier with the experimental curve I have obtained...
Jan
Jan el 30 de En. de 2012
And you want to test the results with all different possible combinations?! This will need about 12 days if you check one solution per second.
Do you think, that an automatic parameter identification might find the solution?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by