Answered

Storing results from a nested for loop

Well theres two ways: 1. Write the results to file as they are generated. (xlswrite & xlsread would be your friends, and you ...

Storing results from a nested for loop

Well theres two ways: 1. Write the results to file as they are generated. (xlswrite & xlsread would be your friends, and you ...

3 years ago | 0

| accepted

Answered

How to create a Executable (.exe) with MatLab 2013b ?

You need the compiler toolbox. The method I use is: mcc <scriptname> -m The Matlab compiler runtimes need to be installed...

How to create a Executable (.exe) with MatLab 2013b ?

You need the compiler toolbox. The method I use is: mcc <scriptname> -m The Matlab compiler runtimes need to be installed...

3 years ago | 0

Answered

maclaurin series code problem

abs(ea(k+1))<es in your code, ea is a scalar, and you're trying to access the k+1th element, which is the error.

maclaurin series code problem

abs(ea(k+1))<es in your code, ea is a scalar, and you're trying to access the k+1th element, which is the error.

3 years ago | 0

| accepted

Answered

max and min complex number

Max is calculating the absolute value, and then taking the maximum value, despite being negative. Greater than is taking the ...

max and min complex number

Max is calculating the absolute value, and then taking the maximum value, despite being negative. Greater than is taking the ...

3 years ago | 0

Answered

How to get a single line on an image?

Oh, I just found the perfect answer. imline.

How to get a single line on an image?

Oh, I just found the perfect answer. imline.

3 years ago | 0

| accepted

Question

How to get a single line on an image?

I'm trying to make a little bit of image analysis software. I need to plot the intensity of pixels lying along a user selected l...

3 years ago | 1 answer | 0

Question

Reading quicktime movies on windows

I am trying to do an assessment of some video capture hardware and a thermal imager. I am trying to establish methods of reading...

4 years ago | 0 answers | 0

Answered

Plot in matlab, multiple plots in one figure.

x_for_z1 = matrix(matrix(:,3)==1,1); y_for_z1 = matrix(matrix(:,3)==1,2); plot(x_for_z1,y_for_z1,'r') hold on etc etc.. ...

Plot in matlab, multiple plots in one figure.

x_for_z1 = matrix(matrix(:,3)==1,1); y_for_z1 = matrix(matrix(:,3)==1,2); plot(x_for_z1,y_for_z1,'r') hold on etc etc.. ...

4 years ago | 0

| accepted

Answered

Using a user defined fucntion with blockproc

What does your "myfunction" function output? It looks like it's not producing any output.

Using a user defined fucntion with blockproc

What does your "myfunction" function output? It looks like it's not producing any output.

4 years ago | 0

Answered

Inf and NaN problem

Logarithms are your friends. Here's what I mean maths: log(UtiliteProba) = (UtiliteB(b,l)+UtiliteC(b,l))/T (values in the ra...

Inf and NaN problem

Logarithms are your friends. Here's what I mean maths: log(UtiliteProba) = (UtiliteB(b,l)+UtiliteC(b,l))/T (values in the ra...

4 years ago | 1

Answered

How to write the first line of a function?

The first line of a function should look something like this: function [a b c] = something(a, b, c) % 3 inputs, 3 outputs ...

How to write the first line of a function?

The first line of a function should look something like this: function [a b c] = something(a, b, c) % 3 inputs, 3 outputs ...

4 years ago | 0

Answered

Vector initialization (randn) with loop 'for'

The time difference is due to what gets done in the loop. randn - This checks the number of inputs (0), generates a number a...

Vector initialization (randn) with loop 'for'

The time difference is due to what gets done in the loop. randn - This checks the number of inputs (0), generates a number a...

4 years ago | 0

Answered

Query about data types and whos

Size is working properly. It is telling you that there are TWELVE characters in the string 'flights_2011'. size(flights_2011...

Query about data types and whos

Size is working properly. It is telling you that there are TWELVE characters in the string 'flights_2011'. size(flights_2011...

4 years ago | 0

| accepted

Answered

Stitching sub images to reconstruct full image

depending how you've done it.... BInew = permute(BI,[1 3 2]); BInew = reshape(BInew,16*size(BI,1),[]); ought to work.

Stitching sub images to reconstruct full image

depending how you've done it.... BInew = permute(BI,[1 3 2]); BInew = reshape(BInew,16*size(BI,1),[]); ought to work.

4 years ago | 1

Answered

Not so rhetorical question: Why the common practice of writing lines of code without white space?

When it comes to making code readable, scDSI (:, theta+1) = scRadius * [ cosd(theta); sind(theta); 0.0 ]; Is not as reada...

Not so rhetorical question: Why the common practice of writing lines of code without white space?

When it comes to making code readable, scDSI (:, theta+1) = scRadius * [ cosd(theta); sind(theta); 0.0 ]; Is not as reada...

4 years ago | 0

Answered

Problemas with "sum" function

It is a tolerancing problem. By default, matlab does sums to the 15thish significant figure. Small numbers being added to...

Problemas with "sum" function

It is a tolerancing problem. By default, matlab does sums to the 15thish significant figure. Small numbers being added to...

4 years ago | 0

Answered

Matlab Function Problem - Variable Storage

Ok, a FUNCTION is a thing like "sin", it accepts a (none/list of) input parameter(s). It outputs a (none/list of) output paramet...

Matlab Function Problem - Variable Storage

Ok, a FUNCTION is a thing like "sin", it accepts a (none/list of) input parameter(s). It outputs a (none/list of) output paramet...

4 years ago | 0

Answered

how to plot clearer angle yticklabels at whole fractions of 360° (and/or fractions of pi, for radians) in stead of decimal

You can change where the ticks go: set(axishandle,'YTick', [0 4 6 8 ...] ) You can change the labels as you like: set...

how to plot clearer angle yticklabels at whole fractions of 360° (and/or fractions of pi, for radians) in stead of decimal

You can change where the ticks go: set(axishandle,'YTick', [0 4 6 8 ...] ) You can change the labels as you like: set...

4 years ago | 0

Answered

Reading .dat files into Matlab

Theres a few "rotates". flipud, fliplr, transpose/permute, imrotate...

Reading .dat files into Matlab

Theres a few "rotates". flipud, fliplr, transpose/permute, imrotate...

4 years ago | 0

| accepted

Answered

Specific numbers generation Simulink

Matlab code for it would be something like... : listofnumbers = [1 4 7 9]; weight = [1 2 3 4]; % weights, not frequencies....

Specific numbers generation Simulink

Matlab code for it would be something like... : listofnumbers = [1 4 7 9]; weight = [1 2 3 4]; % weights, not frequencies....

4 years ago | 1

Answered

Force scientific notation in axes

Here's a really simple option. Change the units of the axes. Plot time, in, for example, hs, cs, ds, Ds, ms, ks ...

Force scientific notation in axes

Here's a really simple option. Change the units of the axes. Plot time, in, for example, hs, cs, ds, Ds, ms, ks ...

4 years ago | 0

Answered

Comparing two numbers by using IF in Matlab

The code is correct. The problem is that x - y is not precisely 0. The magnitude of the difference will be less than 1e-5 ...

Comparing two numbers by using IF in Matlab

The code is correct. The problem is that x - y is not precisely 0. The magnitude of the difference will be less than 1e-5 ...

4 years ago | 1

| accepted

Answered

I have a cellarray (100000000*2cell) ,how can I save the cell in excel more quickly ?

Here's a better idea. *Don't* save it to a text file. 100 million lines of text, of 40 bytes per line (more if nicely format...

I have a cellarray (100000000*2cell) ,how can I save the cell in excel more quickly ?

Here's a better idea. *Don't* save it to a text file. 100 million lines of text, of 40 bytes per line (more if nicely format...

4 years ago | 2

Answered

Is it possible to use element by element comparison between a single variable and individual matrix values?

Yes. Try these to see what makes sense for your little problem whatever it happens to be... logical_cmp_result = eye(3) ==...

Is it possible to use element by element comparison between a single variable and individual matrix values?

Yes. Try these to see what makes sense for your little problem whatever it happens to be... logical_cmp_result = eye(3) ==...

4 years ago | 0

Answered

plot with different symbols

r1 = rand(1,1000); r2 = rand(1,1000); plot(1:1000,r1,'bx',1:1000,r2,'kx') Change the x to +, d, s, o for other symbols...

plot with different symbols

r1 = rand(1,1000); r2 = rand(1,1000); plot(1:1000,r1,'bx',1:1000,r2,'kx') Change the x to +, d, s, o for other symbols...

4 years ago | 0

Question

Setting priority of parallel tasks

I have a function, which to optimise it, I am going to have to split into two separate sequences of parallel processes (using pa...

4 years ago | 0 answers | 0

Answered

Plotting different sections of multiple arrays using a loop

Assuming your plot command is correct, all you need to do is modify it: plot(Time(1:length(data{k,1})),data{k,1}); plot(...

Plotting different sections of multiple arrays using a loop

Assuming your plot command is correct, all you need to do is modify it: plot(Time(1:length(data{k,1})),data{k,1}); plot(...

4 years ago | 0

Answered

Plotyy and giving each line its own color

It is possible. It might not be that good of an idea if it makes it hard to identify which line goes with which axis (using subp...

Plotyy and giving each line its own color

It is possible. It might not be that good of an idea if it makes it hard to identify which line goes with which axis (using subp...

4 years ago | 0

Answered

Q: How to remove outline circle in this image?

A simple method is to use "bwlabel". This assigns each of the non-touching white areas a unique number. You can then pick each o...

Q: How to remove outline circle in this image?

A simple method is to use "bwlabel". This assigns each of the non-touching white areas a unique number. You can then pick each o...

4 years ago | 0