답변 있음
how to interrupt a while loop??
In your GUI, set some user data to your GUI handle. In your loop, check this data and |break| accordingly.

7년 이상 전 | 0

답변 있음
remove rows with all zeros
Search facility on Answers shows this question is asked a lot... Here's one of the more recent. <http://www.mathworks.com/ma...

7년 이상 전 | 0

답변 있음
Question on optimization problem and fminsearch,fminunc,lsqnonlin
Depending on how localised your minima are, you can sometimes get around this with a simplex-based solver like |fminsearch|. I ...

7년 이상 전 | 0

답변 있음
Reading two voltages from arduino.
Probably because you're asking it to read integers (%d), not floats (%f). Make that change. Also, beware of MatLab's |fscanf...

7년 이상 전 | 0

| 수락됨

답변 있음
for and parfor
That's a thought-provoking question. "Faster" is not always a requirement in computing. Also, there are many algorithms or s...

7년 이상 전 | 0

| 수락됨

답변 있음
Add a colum and a row of blank (white) values in an Image
Your best options (as far as I know) are: 1. Resize the image twice (once for new row, once for new column) im(end+1, :)...

7년 이상 전 | 1

답변 있음
Fitting data with two peaks
Define a function that accepts the parameters of the two lorenzian curves and computes the full curve. I don't know how many ...

7년 이상 전 | 2

답변 있음
Change Secod Axis Color And Tick Label Colors
set(haxes(2), 'YColor', 'r');

7년 이상 전 | 2

답변 있음
Renumber an axis of a figure
You can replace the 'XTick' member of the axis. Here, I just use the handle to the current axis. x = 0:1.224:10; y = ra...

7년 이상 전 | 0

| 수락됨

답변 있음
Creating a desktop shortcut to run an mfile, Windows 7
A batch file to do this is almost exactly the same as a shortcut. You still need to know the MatLab install path. Now, I did a...

7년 이상 전 | 0

| 수락됨

답변 있음
Function using for loop
There's a pattern here... state1 = max( ceil(x(1) / 5), 1 ); state2 = max( ceil(x(2) / 5), 1 ); Just as a point on st...

7년 이상 전 | 0

답변 있음
Leaving a blank line between inputs
input('\nsome question :', 's')

7년 이상 전 | 1

| 수락됨

답변 있음
delete zeros rows and columns
Yeah you did too much! % Remove zero rows data( all(~data,2), : ) = []; % Remove zero columns data( :, all(~data...

7년 이상 전 | 7

답변 있음
String parsing
It kinda depends on how flexible you need to be. Are the tags ever in a different order? Is the format EXACTLY as given? Are ...

7년 이상 전 | 1

| 수락됨

답변 있음
Transfer a matrix in a quick way
If you want to preserve each 4x3 block, you could try something like this: B = reshape(A(:, [1:3:end, 2:3:end, 3:3:end]), [...

7년 이상 전 | 0

| 수락됨

답변 있음
Anyone using MATLAB on a LINUX OS??
MatLab directly supports many Linux flavours, including Red Hat: <http://www.mathworks.com/support/sysreq/current_release/linux....

7년 이상 전 | 0

답변 있음
divide and conquer
<http://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm>

7년 이상 전 | 0

답변 있음
Stop the for loop
Time for the most basic of debugging practises... After you calculate j, put in the following line of code: disp(j); ...

7년 이상 전 | 1

| 수락됨

답변 있음
Uncorrelated sinuoids
By 'uncorrelated', you just mean out-of-phase, right? This is about as simple as wave generation gets. Just work out how muc...

7년 이상 전 | 0

답변 있음
Detect a human figure in a live video
Employ a 2 year-old child to sit in front of the screen and "point at the person". This solution is 100% accurate with absolu...

7년 이상 전 | 0

답변 있음
summation inside a "for loop"
I would expect this to work: B = zeros(length(q), size(A,2)); for j = 1:length(q) B(j,:) = sum( exp(q(j)*A) ); e...

7년 이상 전 | 0

| 수락됨

답변 있음
Image acquisition-skipping frames
Those images are 512 * 512 * 1 ? That's 256kB. These are small. What is your frame rate? I'll assume 50 fps. That's 12.5 MB...

7년 이상 전 | 0

답변 있음
needs to get projection of one point from one x-axis to another
Have I understood correctly? You have |xred| and |xmag| which are two different ranges. You want to translate the x-coord from...

7년 이상 전 | 0

답변 있음
Arrays of structures indexing
Start by working out which structures had a result: bValid = ~cellfun( @isempty, ind ); Now, you need to find the row in...

7년 이상 전 | 0

답변 있음
sorting columns with empty cells
You don't _have_ to use |datenum| to sort this data - I find |datenum| too slow and I generally avoid it. I prefer to represent...

7년 이상 전 | 0

답변 있음
How to generate 0 and 1 with equal probability using 'randi' function?
You did it backwards. Do this: nums = randi([0 1], M, N) Please note that while there is equal probability of randomly ...

7년 이상 전 | 5

| 수락됨

답변 있음
calculate the Coding delay
Do this: tic doStuffThatYouWantToTime(); toc

7년 이상 전 | 1

| 수락됨

답변 있음
Matlab simplify boolean expression
The expression: (A && B) || (A && ~B) Is logically equivalent to: A The reason is that both terms require |A| to...

7년 이상 전 | 1

답변 있음
Efficiently populating an array without for loops
Hah... So an alternative in Order(N) time... for n = 1:size(MyData,1) row = MyData(n, [1,2,3]); ObjectTypes(row(...

7년 이상 전 | 0

| 수락됨

답변 있음
Efficiently populating an array without for loops
Yeah that's searching through your data an awful lot every time you do the |==| comparisons. The way I do this kind of thing wh...

7년 이상 전 | 0

Load more