Respondida
Interactive graph and data collection
Have you looked at the <http://www.mathworks.com/help/techdoc/ref/ginput.html GINPUT> function?

alrededor de 15 años hace | 0

| aceptada

Respondida
Is PAUSE a superset of DRAWNOW?
Interesting. In the DRAWNOW doc for 2007b, PAUSE is listed in the bulleted list of events that flush the event queue. But the ...

alrededor de 15 años hace | 2

Respondida
When to break the MATLAB rules?
I have seen good uses for EVAL. One that comes to mind is Doug Shwarz's <http://www.mathworks.com/matlabcentral/fileexchange/23...

alrededor de 15 años hace | 1

Respondida
When to break the MATLAB rules?
One example where breaking the rules applies is the use of dynamic pre-allocation, as discussed and demonstrated in my (and Jan'...

alrededor de 15 años hace | 2

Respondida
Telling MATLAB to wait
Do you call PLOT after every time-step? After every time-step, call PLOT then cal DRAWNOW. You can also call PAUSE with a time...

alrededor de 15 años hace | 2

| aceptada

Respondida
fill
t = (1/16:1/8:1)'*2*pi; x = sin(t); y = cos(t); h = fill(x,y,'r'); % Choose a number between 0 (invisible) and 1 (opaq...

alrededor de 15 años hace | 3

Respondida
Setting GUI Control Default Properties by Style
When I write GUIs I usually specify the minimum property descriptions necessary for each style, then at the end of my initializa...

alrededor de 15 años hace | 0

| aceptada

Respondida
Let users enter integer, warn them if they enter anything else
a is not a string. In MATLAB a string has a single quote. This is how you enter a string: Enter an integer: 'a' When you j...

alrededor de 15 años hace | 0

Respondida
what is wrong?
The problem is that in your first N, all of the values sum to m: m=22; N=[8,11,18,7,9,8,13;6,2,1,5,3,6,1;4,3,2,5,5,4,6;4,6,...

alrededor de 15 años hace | 1

Respondida
Condition which reduces the size of the vector
v = [1,3,2,1,4,6,7,8,5,2]; vnew = v(v<5) % Returns: vnew = [1 3 2 1 4 2]

alrededor de 15 años hace | 0

| aceptada

Respondida
How can I train myself in working with arrays professionally?
I am afraid you are a little misinformed. Working with arrays, commonly known as using _vectorized_ code, is not *_necessarily_...

alrededor de 15 años hace | 1

Respondida
Mouse control in GUI and contrast button access
For the first question, have a look at the WindowScrollWheelFcn (and cousins) of the GUI figure. For the second, set the menu...

alrededor de 15 años hace | 0

Respondida
Double clicking on axes
It works fine here. How are you doing things differently than this? I can double-click all I want on the axes and the toggles ...

alrededor de 15 años hace | 0

Respondida
"Matlab has stopped working" 2009b on Windows 7 64-bit when running a "figure" command
Does changing the renderer help? % First set the renderer. set(gcf,'Renderer','zbuffer') % Then plot your stuff...

alrededor de 15 años hace | 0

Respondida
Matrix manipulation syntax help
Another suggestion: <http://www.mathworks.com/matlabcentral/fileexchange/23998-findsubmat FINDSUBMAT> x2 = length(findsubma...

alrededor de 15 años hace | 0

Respondida
Elegant way to extract part of a structure as an array
vals = [s(1:2).x]

alrededor de 15 años hace | 25

| aceptada

Respondida
Change line type when figure handle is known
You could also try this tool, which allows you to make arbitrary changes with a mouse-click: <http://www.mathworks.com/matlab...

alrededor de 15 años hace | 1

Respondida
erfc with complex number
A quick search of the FEX turned up these two. There may be others... <http://www.mathworks.com/matlabcentral/fileexchange/1...

alrededor de 15 años hace | 2

| aceptada

Respondida
Let users enter anything, save integers, give warning otherwise
A = []; while 1 userVar = input('Enter an integer, (or return to quit): '); if isempty(userVar) ...

alrededor de 15 años hace | 1

Respondida
How to multiply a vector with each column of a matrix most efficiently?
I find the looping option fastest on my Win Vista 32 bit. Using r2007b. >> more_loop_timings Elapsed time is 0.017479 sec...

alrededor de 15 años hace | 5

Respondida
One image input for multiple buttons and fields in a gui
So why isn't the RADI field in the handles structure? In your regblurbtn_Callback function, put this line to display what is ...

alrededor de 15 años hace | 0

| aceptada

Respondida
nested for loop
The way you have defined S, it is independent of index i. S(i,j) = ((Xone(j)-X(j))^2 + (Yone(j)-Y(j))^2)^0.5; % No i appears....

alrededor de 15 años hace | 0

| aceptada

Respondida
Output image and patch as new image
Use <http://www.mathworks.com/help/techdoc/ref/getframe.html GETFRAME> to capture what you see on the axes. For example: X =...

alrededor de 15 años hace | 0

| aceptada

Respondida
error when putting a matrix in the exp function- please review code and help me resolve! the error reads: ??? Subscript indices must either be real positive integers or logicals.
On line 28 you define: exp = expcdf(x,muhat_exp); Now you know why it is not a good idea to name variables the same name as ...

alrededor de 15 años hace | 1

Respondida
How to check whether a structure exists?
I am not entirely sure what you want to do, but here is an example input parsing... You don't have to make your function error ...

alrededor de 15 años hace | 0

Respondida
concatenate structs in a loop
A 1-by-n structure, where the data in each n has the same number of rows but different number of columns: A(1,1).B = [5.5 4.5...

alrededor de 15 años hace | 0

| aceptada

Respondida
Need help using colon operator with multiple matrices - I'm really close to being loopless!
I am not sure if this is in the above thread or not. But perhaps the simplest FOR loop version is this: a=[1 2 3]; b=[4 ...

alrededor de 15 años hace | 0

Respondida
Real Time Functionality of Matlab -- I need Matlab to find an image file and open it once the image file is created.
You could set a timer callback to do this. Start by creating a list of the images in the file. This list will be updated and s...

alrededor de 15 años hace | 0

Respondida
How to set the axes limits within a GUI
You probably need to find the handle to the axes object. Ax = findall(0,'type','axes') axis(Ax,[-1 1 -4 4]) Assuming this...

alrededor de 15 años hace | 0

| aceptada

Respondida
power law distribution - maximum likehood
I recommend you give this a thorough looking over, and get the article to which this site is a companion. They give MATLAB file...

alrededor de 15 años hace | 1

| aceptada

Cargar más