Adding a scrollbar to change a graph

조회 수: 2 (최근 30일)
Guillermo Lopez
Guillermo Lopez 2012년 1월 30일
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.

채택된 답변

Jan
Jan 2012년 1월 30일
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
Guillermo Lopez
Guillermo Lopez 2012년 1월 30일
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 2012년 1월 30일
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?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by