How can I store values of variables in Excel after each iteration?

3 visualizaciones (últimos 30 días)
I have a row matrix X with enteries [1:n] n can 2 3 or any number. There is an another array F with entries equal to 'n'. These entries are inline functions and are evaluated at the entries stored in X. The output of entries in F are scalars i.e. after evaluation of F, F becomes a column matrix. The value of X and F are changing in a loop.I want to store the values of X(as a row matrix),F(as a row matrix) and counter(it keeps the count of iterations) in three separate columns e.g counter under A,X(as row vector) under B and F(as row vector) in C.Please suggest an efficient way to achieve this.Code for this would be greatly appreciated.
P.S. This code is for Newton's method for non-linear equations

Respuesta aceptada

Image Analyst
Image Analyst el 8 de Nov. de 2014
I deleted your prior duplicate question because I assume this one is more up-to-date. But my answer remains the same:
Put them into a 2D array. Put a grid/table/spreadsheet control on your GUI ( you can use GUIDE to do this). Then send your data to the table with set():
set(handles.uitable1, 'data', array2D);
  3 comentarios
Image Analyst
Image Analyst el 8 de Nov. de 2014
It's pretty easy. Just start guide, put a table and a button on it, and use the code I gave. See this simple tutorial to get you started: http://blogs.mathworks.com/videos/category/gui-or-guide/
You can also try this framework http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component though it does not have a table control on it.
Description
This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to .....................
Ahsun Ali
Ahsun Ali el 11 de Nov. de 2014
Thank you very much for your help! Much appreciated.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by