Réponse apportée
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: ...

plus de 8 ans il y a | 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...

plus de 8 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

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

plus de 8 ans il y a | 2

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

plus de 8 ans il y a | 1

Réponse apportée
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 ...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

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

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
I need to count the numbers from a vector to form a new vector, so I need to use (2, 3, 1) to get (1, 1, 2, 2, 2, 3). How do I do this?
repelem( 1:3, [2 3 1] ) should work.

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
convert rgb to gray
You need the Image Processing Toolbox for this function in R2014a

plus de 8 ans il y a | 0

Réponse apportée
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

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 2

| A accepté

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

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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) ...

plus de 8 ans il y a | 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(...

plus de 8 ans il y a | 5 réponses | 5

5

réponses

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
Make the FIND more compact
M( ismember(B, Alert_LessThree) ) = 2

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
I have a problem related to my following code... Code generation required variable 'B1' to be fully defined before sub scripting it.
Just pre-declare B1 as B1 = zeros(mB,1);

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to create column that is the difference between rows in another column
doc diff

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
Problem with Openfig handling
hAxes = findobj( fig, 'type', 'axes' ); set( hAxes, 'Color', 'None' )

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 2

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

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

plus de 8 ans il y a | 2

| A accepté

Charger plus