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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 2

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

circa 15 anni fa | 1

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

circa 15 anni fa | 2

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

circa 15 anni fa | 2

| accettato

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

circa 15 anni fa | 3

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 1

Risposto
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]

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 1

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

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

circa 15 anni fa | 25

| accettato

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

circa 15 anni fa | 1

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

circa 15 anni fa | 2

| accettato

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

circa 15 anni fa | 1

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

circa 15 anni fa | 5

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 1

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 1

| accettato

Carica altro