How to code a slider in Octave to have interactive plot?

后端 未结 2 994
自闭症患者
自闭症患者 2020-12-17 06:33

my target is to have a plot that shows Stochastic oscillator on forex market, and in order to validate which parameter is the best one to setup it, I would use a slider to m

2条回答
  •  隐瞒了意图╮
    2020-12-17 06:56

    Have a look at this demo which will give you an window like that which should answer all your questions:

    The relevant parts for your specific questions are:

    h.noise_slider = uicontrol ("style", "slider",
                                "units", "normalized",
                                "string", "slider",
                                "callback", @update_plot,
                                "value", 0.4,
                                "position", [0.05 0.25 0.35 0.06]);
    ....
     noise = get (h.noise_slider, "value");
    

    Be sure to use the Qt toolkit!

提交回复
热议问题