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

1 visualización (últimos 30 días)
Dale Janry Serrano
Dale Janry Serrano el 17 de En. de 2020
Comentada: Walter Roberson el 19 de En. de 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 comentarios
Dale Janry Serrano
Dale Janry Serrano el 19 de En. de 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 el 19 de En. de 2020
Use the debugger to figure out which line the problem is occurring on.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by