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

mehr als 13 Jahre vor | 12

| akzeptiert

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 1

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 1

| akzeptiert

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 1

| akzeptiert

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

mehr als 13 Jahre vor | 1

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 1

| akzeptiert

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

mehr als 13 Jahre vor | 0

| akzeptiert

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

mehr als 13 Jahre vor | 1

| akzeptiert

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

mehr als 13 Jahre vor | 1

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

mehr als 13 Jahre vor | 1

| akzeptiert

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

| akzeptiert

Gelöst


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

mehr als 13 Jahre vor

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

fast 14 Jahre vor | 1

| akzeptiert

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

fast 14 Jahre vor | 1

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 1

Mehr laden