Respondida
selecting only the numbers from a string variable
B = regexp(A,'\d*','Match'); returns one result for each number found in each string. You will then have to get the last ...

más de 13 años hace | 12

| aceptada

Respondida
Random numbergeneration with constraints
ulim=20; %max value llim=10; %min value rowlim=60; %max sum for each row m=5; %rows n=4; %columns RMat=ran...

más de 13 años hace | 0

| aceptada

Respondida
Is there a way to delete a whole row in a uitable by clicking a delete row button?
If you want to delete table data with a pushbutton, then I think you'll have to also have a cell selection callback so you know ...

más de 13 años hace | 0

Respondida
how to use a while loop to perform an infinite series approximation
Here's a shabby way of doing it... x=pi/2; %test: sin(pi/2)=1; error=1; n=1; count=0; while error >= 1*(10^-3); %x ...

casi 14 años hace | 0

| aceptada

Respondida
m_proj question: unexpected error
The clue's in the name- one is a 1x30 vector, the other's 1x180; you can make them the same size by setting the 3rd argument in ...

casi 14 años hace | 0

Respondida
Print Pushtool in gui doesn't work!
It could be the renderer. Try get(handles.figure1,'Renderer') for both types of plot and see if they're different. The r...

casi 14 años hace | 0

| aceptada

Respondida
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...

casi 14 años hace | 0

| aceptada

Respondida
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...

casi 14 años hace | 1

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

casi 14 años hace | 0

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

casi 14 años hace | 0

Respondida
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,:) ...

casi 14 años hace | 0

| aceptada

Respondida
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 ...

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 0

Respondida
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...

casi 14 años hace | 0

| aceptada

Respondida
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.

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 1

Respondida
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...

casi 14 años hace | 0

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

casi 14 años hace | 0

Respondida
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...

casi 14 años hace | 1

| aceptada

Respondida
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...

casi 14 años hace | 0

| aceptada

Respondida
"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)- ...

casi 14 años hace | 1

| aceptada

Respondida
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/>

casi 14 años hace | 1

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

casi 14 años hace | 1

| aceptada

Respondida
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)...

casi 14 años hace | 0

Respondida
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...

casi 14 años hace | 0

| aceptada

Resuelto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

casi 14 años hace

Respondida
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...

alrededor de 14 años hace | 1

| aceptada

Respondida
??? 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...

alrededor de 14 años hace | 1

Respondida
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...

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 1

Cargar más