Answered
Stacked Bar and Legend Handles
I'll have a stab at: h1=bar(x1, y1, 'r', 'stack'); hg1=hggroup; set(h1,'Parent',hg1) hold all; h2=bar(x2, y2, 'b', 's...

nästan 12 år ago | 0

| accepted

Answered
Optimize the FOR loop
It seems what you're trying to is find the first instance of each value of x being less than each value of y. You can do this i...

nästan 12 år ago | 1

Answered
How can I save figures into structures?
hgsave(FigHandle,'Filename.mat') May be of interest

nästan 12 år ago | 0

Answered
converting vector to matrix
doc reshape in this case: V1=reshape(V,3,3)

nästan 12 år ago | 0

Answered
Adding up sizes of cell arrays
You've made sizeofCellArray a cell, but then treat it like a double: for j = 1:NumberOfClasses sizeOfCellArray(j,:) ...

nästan 12 år ago | 0

| accepted

Answered
Record iterations of loop that has a constant numel
It's not entirely clear to me, but it looks like the variable num will have a length of 252. I think the best way would be to ...

nästan 12 år ago | 1

| accepted

Answered
simple inequality check fails - why?
You have to split up the comparisons: e.g.: x > 0 & x < 1

nästan 12 år ago | 0

Answered
Select multiple files in browser for conversion.
uigetfile({'*.pgm;*.bmp'}, 'Select image for conversion to *.bmp','MultiSelect','On') which will give you a cell array of...

nästan 12 år ago | 0

| accepted

Answered
Callback only works outside image on panel
You will need to set the image's Button Down Function, in the same way as for the panel.

nästan 12 år ago | 1

| accepted

Answered
How to access and use specific data from a structure
You can avoid using a loop altogether: m=cellfun(@max,struct2cell(Graph));

nästan 12 år ago | 1

Answered
converting structure array to xls file
The struct2cell function is probably what you need, though you'll have to dig through a bit as it only goes to the first level o...

nästan 12 år ago | 0

Answered
viewing the execution of a program
Have you looked at the echo function?

nästan 12 år ago | 0

Answered
Question on function handles
Roughly speaking, f and h are handles to small functions- functions that have been made without having to actually write fu...

nästan 12 år ago | 1

| accepted

Answered
Not sending variable to workspace
You would have to do this inside a function, but is there anything to stop you from creating the structure without generating th...

nästan 12 år ago | 0

| accepted

Answered
"H must be the handle to a figure or figure descendent" when updating handles.
It appears to be because of this line: if length(handles.amplitudeList)>5 && max(abs(handles.amplitudeList(end-5:end-1)- ...

nästan 12 år ago | 1

| accepted

Answered
Changing color of a string in listbox - MATLAB GUI
You can do it with html- see <http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/>

nästan 12 år ago | 1

Answered
Creating an empty table matlab GUI
A=cell(3,1) will create an empty table.

nästan 12 år ago | 1

| accepted

Answered
Plotting with a handle stored in a variable
you don't need to use the apostrophes, or even really the plotloc variable, you can just write plot(handles.smallgraph,x,y)...

nästan 12 år ago | 0

Answered
Zooming in on a graph / partitioning a data set
You could use ginput two or three times: the first ones to adjust the x and y limits around the point selected, and the last one...

nästan 12 år ago | 0

| accepted

Answered
Subplots with equal "nice" y-axes -- is there a function?
Once you've finished creating all the subplots (and you have the handles), you can set all of them at once by using : set(A...

ungefär 12 år ago | 1

| accepted

Answered
??? In an assignment A(I) = B, the number of elements in B and I must be the same.
I'm not entirely sure what the variables are, but you may be meaning to do an element-by-element divide, not a matrix divide: in...

ungefär 12 år ago | 1

Answered
separating a part of plot from an original fft plot
you can use the greater than/ less than symbols to do this: say your frequency data is stored as X, and your FFT data is stored...

ungefär 12 år ago | 0

Answered
Modify colorbar in .fig file
Try: caxis([0.1 0.7])

ungefär 12 år ago | 1

Answered
Font of axis data and legends
Get the handle of the label, legend etc: Handle=xlabel(...) Then you can use set(Handle,'FontName',[name of font])

ungefär 12 år ago | 0

| accepted

Answered
"Subscript indices must either be real positive integers or logicals" Error... How to solve this!
the smallest value of i is 1, but you are assigning to an array by using i-2. So for the 2nd to last iteration of the loop you ...

ungefär 12 år ago | 0

Answered
How to add a file location in Matlab
You can change the current directory (the folder Matlab is currently working in) using the cd function. e.g. cd C:\Tes...

ungefär 12 år ago | 0

| accepted