How can I store values of variables in Excel after each iteration?
조회 수: 3 (최근 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!