回答済み

Using "find" for finding decimal values

MiauMiau, the numbers you are looking for are obviously different from the short format you see. Do this: [~,idx] = min(...

Using "find" for finding decimal values

MiauMiau, the numbers you are looking for are obviously different from the short format you see. Do this: [~,idx] = min(...

8年弱 前 | 1

| 採用済み

回答済み

How to add a timer

Here is a simple example. You should be able to adapt the concepts to your GUI or whatever. function [] = gui_timer() ...

How to add a timer

Here is a simple example. You should be able to adapt the concepts to your GUI or whatever. function [] = gui_timer() ...

8年弱 前 | 0

回答済み

Changing the colour of a plot

load Data S = surf(x1, y1, z1); % Original to compare figure S2 = surf(x1, y1, z1); set(S2,'facecolor','interp','C...

Changing the colour of a plot

load Data S = surf(x1, y1, z1); % Original to compare figure S2 = surf(x1, y1, z1); set(S2,'facecolor','interp','C...

8年弱 前 | 0

回答済み

How to vectorize a find

The last statement you show _is_ vectorized, so the question is ill-posed. I think what you are asking for is a way to speed up...

How to vectorize a find

The last statement you show _is_ vectorized, so the question is ill-posed. I think what you are asking for is a way to speed up...

8年弱 前 | 2

| 採用済み

質問

Where is a list of eventtypes for listeners?

_Usually_ I think MATLAB has excellent documentation, but there are occasions when I have to pull my hair out looking for someth...

8年弱 前 | 2 件の回答 | 6

回答済み

How to constantly update a plot off of a slider being pulled

Yes. function [] = slider_plot() % Plot different plots according to slider location. S.fh = figure('units','...

How to constantly update a plot off of a slider being pulled

Yes. function [] = slider_plot() % Plot different plots according to slider location. S.fh = figure('units','...

8年弱 前 | 0

回答済み

If , while with or

Did you look at the documentation? doc while In the documentation are examples. a = 1; b = 10; c = 20; d...

If , while with or

Did you look at the documentation? doc while In the documentation are examples. a = 1; b = 10; c = 20; d...

8年弱 前 | 1

回答済み

Does logical indexing have a direct inverse?

Simple example: A = randperm(4); X = [0 1 0 1] B = A(X~=0) clear A Now _just look at_ X and B. By looking at j...

Does logical indexing have a direct inverse?

Simple example: A = randperm(4); X = [0 1 0 1] B = A(X~=0) clear A Now _just look at_ X and B. By looking at j...

8年弱 前 | 0

回答済み

How do I plot specific values from a matrix

idx = A(:,4)==3.7 & A(:,2)==1.2; plot(A(idx,1),A(idx,5)) Beware floating point issues!

How do I plot specific values from a matrix

idx = A(:,4)==3.7 & A(:,2)==1.2; plot(A(idx,1),A(idx,5)) Beware floating point issues!

8年弱 前 | 0

回答済み

UICONTEXTMENU will not appear on GUI

You need to set the uicontextmenu property, not assign a parent. S.fh = figure; cmenu = uicontextmenu; bgmenu = uim...

UICONTEXTMENU will not appear on GUI

You need to set the uicontextmenu property, not assign a parent. S.fh = figure; cmenu = uicontextmenu; bgmenu = uim...

8年弱 前 | 0

| 採用済み

回答済み

Compare two vectors for similarity

What is the criteria for 'almost similar' in your application? 90% same exact values? 90% of the values in one vector within 9...

Compare two vectors for similarity

What is the criteria for 'almost similar' in your application? 90% same exact values? 90% of the values in one vector within 9...

8年弱 前 | 0

| 採用済み

回答済み

For Loop runs too many times

I am confused about your question. You say you want to have C be a 2-by-3-by-4 array at the end of the loop, correct? That is ...

For Loop runs too many times

I am confused about your question. You say you want to have C be a 2-by-3-by-4 array at the end of the loop, correct? That is ...

8年弱 前 | 1

回答済み

Reference to non-existent field 'aD42'? Please help.

Use this line: solaD = solve(eqaDx,eqaDy,ep5z,aD42) Instead of the one you use for solaD. The problem is you have three...

Reference to non-existent field 'aD42'? Please help.

Use this line: solaD = solve(eqaDx,eqaDy,ep5z,aD42) Instead of the one you use for solaD. The problem is you have three...

8年弱 前 | 0

| 採用済み

回答済み

Product of probabilities by group

Here is another method. This might work best if you have groups in increments of one because it uses the group number as the in...

Product of probabilities by group

Here is another method. This might work best if you have groups in increments of one because it uses the group number as the in...

8年弱 前 | 1

| 採用済み

回答済み

Predefined variables k, z? Ans Help

k is a integer constant: Any integer k gives another solution. This is common with periodic functions. z is probably any comp...

Predefined variables k, z? Ans Help

k is a integer constant: Any integer k gives another solution. This is common with periodic functions. z is probably any comp...

8年弱 前 | 0

回答済み

GUI differences among different users

Set the renderer of the GUI figure to painters or zbuffers and try again.

GUI differences among different users

Set the renderer of the GUI figure to painters or zbuffers and try again.

8年弱 前 | 0

回答済み

How does one add multiple objects at random postions?

Add 5 of them: for ii = 1:5 mge_add_object('name','bear1','type','obstacle','pos', [randi(5),rand...

How does one add multiple objects at random postions?

Add 5 of them: for ii = 1:5 mge_add_object('name','bear1','type','obstacle','pos', [randi(5),rand...

8年弱 前 | 0

回答済み

Problem with datestr e datenum

>> data_even = {' 31/10/2012' ' 31/10/2012' ' 01/11/2012' ' 01/11/201...

Problem with datestr e datenum

>> data_even = {' 31/10/2012' ' 31/10/2012' ' 01/11/2012' ' 01/11/201...

8年弱 前 | 0

| 採用済み

回答済み

In a MatLab plot, when is 'box on' the default, and when is it not?

I see you were not just using the PLOT function. The STAIRS function sets the box to on (line 99 in stairs.m). Thus as I s...

In a MatLab plot, when is 'box on' the default, and when is it not?

I see you were not just using the PLOT function. The STAIRS function sets the box to on (line 99 in stairs.m). Thus as I s...

8年弱 前 | 0

回答済み

Select a radiobutton.Calculate derivation or integration.

If you put the code in SelectionChangeFcn, then the integral or derivative will be computed as soon as the user changes radio bu...

Select a radiobutton.Calculate derivation or integration.

If you put the code in SelectionChangeFcn, then the integral or derivative will be computed as soon as the user changes radio bu...

8年弱 前 | 1

| 採用済み

回答済み

how can i determine whether a matrix of any size is sorted or not (by rows and by columns)?

See the help for the ISSORTED function. help issorted

how can i determine whether a matrix of any size is sorted or not (by rows and by columns)?

See the help for the ISSORTED function. help issorted

8年弱 前 | 0

回答済み

Need help with edit box in matlab gui

n = str2double(get(handles.edit2,'String'));

Need help with edit box in matlab gui

n = str2double(get(handles.edit2,'String'));

8年弱 前 | 0

| 採用済み

回答済み

Matlab out of memory when use index to access an element of an array

You are probably seeing copy-on-write behavior. When you first assign the value of rows to cols, MATLAB doesn't actually create...

Matlab out of memory when use index to access an element of an array

You are probably seeing copy-on-write behavior. When you first assign the value of rows to cols, MATLAB doesn't actually create...

8年弱 前 | 3

| 採用済み

回答済み

how to simplify multi- if statement

STR = char(65:90) KEY = randi(10000,1,length(STR)) But what are you going to do with these that you would need an IF blo...

how to simplify multi- if statement

STR = char(65:90) KEY = randi(10000,1,length(STR)) But what are you going to do with these that you would need an IF blo...

8年弱 前 | 0

| 採用済み

回答済み

Subscript indices must either be real positive integers or logicals.

In that line you are indexing k and a as if they were variables. you need to insert a * in two spots. You have 'a(' instead of...

Subscript indices must either be real positive integers or logicals.

In that line you are indexing k and a as if they were variables. you need to insert a * in two spots. You have 'a(' instead of...

8年弱 前 | 1

回答済み

Plots Stacking when it is unwanted.

Your description of the problem is not clear. Do you want to put a: hold off as the last line of this section of code?

Plots Stacking when it is unwanted.

Your description of the problem is not clear. Do you want to put a: hold off as the last line of this section of code?

8年弱 前 | 0

| 採用済み