Answered
Why does my GUI take forever every time I try to plot using values retrieved from edit boxes?
I would suggest using doc profile on this to see where the main time is being spent. My guess would be this though: ...

8 years ago | 0

Question


Faster alternative to find or logical indexing for specific problem
I have a massively iterative algorithm in which this code sits so I am profiling it whenever I add something to the algorithm an...

8 years ago | 1 answer | 0

1

answer

Answered
how to use figure command in script
doc figure tells you how to use the figure command. Just create a figure then plot as a separate instruction, don't pass p...

8 years ago | 0

Answered
Switch expression must be a scalar or string constant -- Matlab GUI
Just keep them all as strings. You can't convert STR18 to a number so don't convert the others either, just switch on the strin...

8 years ago | 1

Answered
Selecting one array out of three.
n = randi( 3 ) switch ( n ) case 1 D = A; case 2 D = B; case 3 D = C; e...

8 years ago | 2

Answered
anonymous function for if-else statements
<https://blogs.mathworks.com/loren/2013/01/10/introduction-to-functional-programming-with-anonymous-functions-part-1/> <https...

8 years ago | 1

Answered
what is meant by sparse(0)?
Surely you can just test this in 5 seconds on the command line? K>> sparse(0) ans = All zero sparse: 1×1 ...

8 years ago | 0

Answered
Size of an image?
It means it is a true RGB image with Red, Green and Blue data channels rather than an indexed image that requires a colourmap to...

8 years ago | 0

| accepted

Answered
Coloring specific uitable cells plus adding content
<http://undocumentedmatlab.com/blog/uitable-cell-colors/ Yair Altman's blog post on this subject>

8 years ago | 1

Answered
Trouble passing data between GUI callbacks
You have to use guidata( hObject, handles ) after assigning new data to the handles structure as the one you have in any...

8 years ago | 1

| accepted

Answered
convert rgb to gray
You need the Image Processing Toolbox for this function in R2014a

8 years ago | 0

Answered
how one can find his license number for mtlab or mathswork
Go to 'My Account' in the menu for your login name in the top-right of this site

8 years ago | 0

Answered
Plot - add legend individually
If you are working with a fairly recent version of Matlab (> R2014b I think) then you can edit an existing legend if you keep th...

8 years ago | 2

| accepted

Answered
convert cell to array
names = { sp.Name } will extract them into a single cell array nums = cellfun( @str2double, names ); will turn them...

8 years ago | 1

| accepted

Answered
Hi. I can't plot the x axis data in findpeaks plot?
pks=findpeaks(x,y) is not a supported syntax (assuming the variables are named sensibly) [___] = findpeaks(data,x) ...

8 years ago | 0

Question


Distinguish uifigure from figure programmatically
Is it possible to distinguish a uifigure (appdesigner) from an old-style figure programmatically by an if type test? class(...

8 years ago | 5 answers | 5

5

answers

Answered
How to get cell array of values by index
A_A1 = Amp(IndA1,:); is what you need if Amp is 2 dimensional and you want to retain the 2nd dimension and apply IndA1 down...

8 years ago | 0

Answered
Using function any with multiple conditions
That specific error should be fixable just by replacing && with & The condition itself will always return false though unless...

8 years ago | 1

Answered
Make the FIND more compact
M( ismember(B, Alert_LessThree) ) = 2

8 years ago | 1

| accepted

Answered
Error: The expression to the left of the equals sign is not a valid target for an assignment.
{ and } are not valid syntax in Matlab. Putting these around the body of your for loop is what is leading to errors whose me...

8 years ago | 0

Answered
Plot line in subplot removes axes title
Functions like plot have side effects, one of which is to clear the title. Just change the order: p = plot(a,1:10,1:10:100...

8 years ago | 1

| accepted

Answered
Global variable not seen by function: the function creates a new empty variable
Define your function as: function dx=func(t,x,T) ... Use it as: T=something; [t,x]=ode23s(@(t,x) func(t...

8 years ago | 2

| accepted

Answered
Problem with Openfig handling
hAxes = findobj( fig, 'type', 'axes' ); set( hAxes, 'Color', 'None' )

8 years ago | 1

| accepted

Answered
How to create vectors from a cell array?
[a,b,c] = myCell{:}; Not advisable if the number of vectors you want to create escalates to the state that you are next goi...

8 years ago | 2

Answered
How to display colorbar with unevenly spaced colors on a colorbar with each color interval of equal size?
cmap = [ repmat([1 1 1],100,1) % < 0 repmat([225 225 225]./255,33,1) % 0 - 0.33 repmat([178...

8 years ago | 0

Answered
Plotting a single time series with double y axes, differently labelled
Don't use min and max as variable names, they are functions. yyaxis is meant for use with two distinct plots, each of which h...

8 years ago | 1

Answered
Radiobutton help, compiling error
Unfortunately with both AppDesigner and old style UI components floating around with similar or the same names, but different ov...

8 years ago | 2

| accepted

Load more