how can i understand this code about breast cancer detection? here I'm giving only small part of the cede, i want line by line explanation.

2 views (last 30 days)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @BrestCancerDetection_OpeningFcn, ...
'gui_OutputFcn', @BrestCancerDetection_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end

Accepted Answer

Walter Roberson
Walter Roberson on 17 Feb 2017
I could probably write more than 20 pages of "line by line explanation" of that code. Which would be a very time consuming thing for me to do, and I am not going to do it. I have no idea what your level of experience with computer programming or MATLAB is, so I would have to assume that you have never seen a computer program before, and write a small book about the concepts so that I could be sure you understood the significant of the explanation of those lines.
You need to ask specific questions. Why do you care what it does? It is Magic GUIDE Initialization Code for a GUI named 'BrestCancerDetection' . As long as you keep using GUIDE, GUIDE will automatically update it as needed.
The code you posted has nothing at all to do with how the program actually detects cancer: it is code that has to do with making the point-and-click interface work properly.
  1 Comment
butterfly .
butterfly . on 17 Feb 2017
thanks for response. yes, you are right , its line by line explanation is too lengthy. but i have to understand that code at any cost.what should i do? refer me the book name also.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 17 Feb 2017
Ignore it. It's just boilerplate GUIDE code that's at the top of every GUIDE-generated m-file. Trust me, no one cares about that stuff. No one bothers to try to understand it - we've got better things to worry about. It's just inserted there by GUIDE and it can be ignored. Really. It's like saying you can't drive your car unless you know and understand every page of the auto mechanics service manual for it. Not necessary. Don't waste your time. What's more important is the code that is in the OpeningFcn() function and the callback functions.
If you want to know more about GUIDE, see http://blogs.mathworks.com/videos/category/gui-or-guide/
  3 Comments
Image Analyst
Image Analyst on 17 Feb 2017
Possibly, if it's just about a short section. I'm not going to go line by line through a thousand lines of uncommented code with cryptic sounding variable names and explain them all. Why don't you ask the actual author of the code to help you understand it?
Walter Roberson
Walter Roberson on 17 Feb 2017
I understand the posted code, which is why I can say that is not worth spending time on unless there is a specific question to be answered about it.

Sign in to comment.

Categories

Find more on Genomics and Next Generation Sequencing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!