How can I store values of variables in Excel after each iteration?
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Image Analyst
2014-11-8
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 个评论
Image Analyst
2014-11-8
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 .....................
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!