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

조회 수: 3 (최근 30일)
Ahsun Ali
Ahsun Ali 2014년 11월 8일
댓글: Ahsun Ali 2014년 11월 11일
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

채택된 답변

Image Analyst
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
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 .....................
Ahsun Ali
Ahsun Ali 2014년 11월 11일
Thank you very much for your help! Much appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by