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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
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, :)...

fast 12 Jahre vor | 1

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

fast 12 Jahre vor | 2

Beantwortet
Change Secod Axis Color And Tick Label Colors
set(haxes(2), 'YColor', 'r');

fast 12 Jahre vor | 2

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

Beantwortet
Leaving a blank line between inputs
input('\nsome question :', 's')

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 10

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

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
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]), [...

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

Beantwortet
divide and conquer
<http://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm>

fast 12 Jahre vor | 0

Beantwortet
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); ...

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 7

| akzeptiert

Beantwortet
calculate the Coding delay
Do this: tic doStuffThatYouWantToTime(); toc

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

Beantwortet
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(...

fast 12 Jahre vor | 0

| akzeptiert

Mehr laden