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

1 view (last 30 days)
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 Comments
Dale Janry Serrano
Dale Janry Serrano on 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 on 19 Jan 2020
Use the debugger to figure out which line the problem is occurring on.

Sign in to comment.

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!