Create and display clickable cell of cells in Matlab GUI - matlab

So I want to display a cell matrix in Matlab GUI. Moreover, some of that cells are arrays of cells, and I want them to be clickable and that by clicking on them I activate a function.
Imagine I have a cell matrix:
A=cell(2,2);
A{1,1}='Collumn1';
A{1,2}='Collumn2';
A{2,1}={'A','B','C','D'};
A{2,2}={'E','F'};
I want to display it on an GUI, and I want to be able to click the cells, say to see the content of A{2,1}. Then I would like to click the cell entries in this cell array, and by doing so, I calculate a new matrix of the same form to display on the GUI.
However, uitable doesn't allow me to use a cell array.
An alternative would be to have a matrix of the form:
A=cell(5,2);
A{:,1}={'Collumn1','A',B',C',D'};
A{:,2}={'Numbers',1,2,3,4};
And by clicking the numbers (which I can do) a buttongroup would display (of undefined size), and by selecting one it would calculate a new matrix of the same form to display.
Thanks in advance.

Short answer: you can't
MATLAB GUI only provides only a very parse set of possible gui-elements check this documentation of MATLAB GUI. You need to change your request, so e.g. create an uitable or something like this. If you desire to create more advanced stuff in MATLAB GUI's, then you should start to look into this fellas documentation

Related

Set the value of a cell indirectly n Numbers app

Can a cell other than the cell containing the formula be the target of the results of a formula? If so, how?
I have a large array of Checkbox cells. I use the state of the Checkboxes as references for calculations. Once I have completed that calculation a large number Checkboxes have been selected. I'm looking for a way to reset the Checkboxes to a default state. Resetting them manually can be tedious.
My current thought is to mirror the array, fill it with the default values, and somehow map those to the array of Checkboxes. Here is the rub.
As far as I know, the results of a formula are always in the cell in which the formula appears.
A cell containing a Checkbox cannot contain a formula.
I can use INDIRECT() to Gather the contents of a cell but I haven't seen anything that permits me to indirectly Place a value in a cell.
Anyone have a clue as to how I can indirectly put a value into a cell?

How to manually label ROIs in Training Image labeler?

I am new to Matlab.
I want to label several images to use in SVM training later on.
I have decided to use ROI but i can't label my ROIs. I have objectBoundingBoxes column but i want to have object column and not_object column seperately. Or should I do this by writing code instead of manually? But i do not have any idea about it.
Matlab Page Link
In this matlab page they say click the Add ROI label, I have matlab student 2016a and i dont have this option.
Thanks
I have noticed this option comes with MATLAB 2016b.

How to give name to each element of cell?

I have created a cell like follow:
My_cell=cell(1,20) and I have stored in every part of this cell a matrix.
like this :
My_cell(1,10)=My_matrix
Now I want to give name to each element of this cell such that, later on I can figure out which matrix is stroed in every position of cell.
Would someone help me withis? I'm quite new in Matlab

Why is cell increment not detected correctly in LibreOffice Calc

I have a column which I'd like to fill by selecting the top two cells and then drag down the column.
The cell contents are:
=Sheet1.B11
=Sheet1.B31
So when I drag down I expect to see
=Sheet1.B51
=Sheet1.B71
Instead, I get
=Sheet1.B13
=Sheet1.B33
Why is Calc not detecting the increment correctly? Adding more cells manually does not help.
The numbers in cell references are not single numbers which can be used to create a series in this way. In other words: The cell reference B11 is not "B"&11, but even one single cell reference.
To get references from Sheet1.B11 upwards in steps of 20, you could use INDEX like this:
=INDEX($Sheet1.$B$1:$B$100000,11+(ROW(A1)-1)*20)
Put this formula into a cell and fill it down.

Matlab update plot in one GUI based on activity in second GUI

In one GUI (viewer) I have an image that shows a 2D slice through a 3D image cube. A toolbar button opens a second GUI (z-profile) that plots a 2D graph showing the z-profile of one pixel in the image cube. What I want is to be able to update this plot dynamically when a different pixel is clicked in the original viewer GUI. I've looked in to linkdata but I'm not sure if that can be used to link across two GUIs. Is there a simple way to do this without re-creating the second GUI each time a new pixel is clicked and feeding in the new input location?
You can definitely doing it without recreating the second GUI every time.
Without knowing your specific code I would say that you should store a reference to the second GUI in the first GUI, then in a callback for clicking a pixel in the first GUI, change data in the second GUI via the stored reference (e.g. figure handle). You can store arbitrary data in a figure, for example by using function guidata. A bit of code.
...
figure2 = figure();
figure1 = figure('WindowButtonDownFcn',#myCallback);
guidata(figure1, figure2);
...
function myCallback(obj,eventdata)
figure2 = guidata(obj);
...
Even easier but a bit more error-prone would be to use global variables for storing the references.