답변 있음
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.

거의 12년 전 | 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...

거의 12년 전 | 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 ...

거의 12년 전 | 0

답변 있음
How to set manually training and test data for training a neural network
Read this: <http://www.mathworks.com/help/nnet/ug/divide-data-for-optimal-neural-network-training.html> You want the |divi...

거의 12년 전 | 1

| 수락됨

답변 있음
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...

거의 12년 전 | 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...

거의 12년 전 | 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, :)...

거의 12년 전 | 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 ...

거의 12년 전 | 2

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

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 0

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

거의 12년 전 | 1

| 수락됨

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

거의 12년 전 | 10

답변 있음
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 ...

거의 12년 전 | 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]), [...

거의 12년 전 | 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....

거의 12년 전 | 0

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

거의 12년 전 | 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); ...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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...

거의 12년 전 | 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 ...

거의 12년 전 | 7

| 수락됨

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

거의 12년 전 | 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...

거의 12년 전 | 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(...

거의 12년 전 | 0

| 수락됨

더 보기