How to add code in each cell of the GUI table?

3 Ansichten (letzte 30 Tage)
Dale Janry Serrano
Dale Janry Serrano am 17 Jan. 2020
Kommentiert: Walter Roberson am 19 Jan. 2020
Hi guys I am working a secant method with GUI and I am a total beginner in matlab. I want to ask if it is possible to add code/formula in each cell of the table in GUI? What I want to happen is to automatically solve the linear equation after I press the 'Calculate' push button and the data will be shown on the table below. The picture of the gui is attached here, thanks
  9 Kommentare
Dale Janry Serrano
Dale Janry Serrano am 19 Jan. 2020
Hi Walter Roberson, I already did what you have said and made the f(x0), f(x1) and f(x2) to f0, f1, f2. However, when I run the program and clicked the push button 'Calculate' in the GUI there is an error occurring like this.
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)equationsecant('calculate_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Also, the table is working when I replace the formula of x2 as a constant. I will post a photo of my gui and code here that shows that the table is working when x2 is equal to 2. Thank you btw!!
x2.PNG
Walter Roberson
Walter Roberson am 19 Jan. 2020
Use the debugger to figure out which line the problem is occurring on.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by