Risposto

Fill area under a curve

Yes there is the <http://www.mathworks.com/help/matlab/ref/area.html area> function.

Fill area under a curve

Yes there is the <http://www.mathworks.com/help/matlab/ref/area.html area> function.

oltre 8 anni fa | 2

Risposto

Matlab command for generating random rational numbers between -1 and 0?

Like this? a = -1; b = 0; r = a+(b-a)*rand(1,1) If you want many of them change the inputs to rand. And if you...

Matlab command for generating random rational numbers between -1 and 0?

Like this? a = -1; b = 0; r = a+(b-a)*rand(1,1) If you want many of them change the inputs to rand. And if you...

oltre 8 anni fa | 0

Risposto

How to install Global Optimization Toolbox

You need to purchase it <http://www.mathworks.com/products/global-optimization/index.html here> and then install it on your comp...

How to install Global Optimization Toolbox

You need to purchase it <http://www.mathworks.com/products/global-optimization/index.html here> and then install it on your comp...

oltre 8 anni fa | 0

Risposto

get the actual position correspond to imfreehand

After you get the position, you can create a mask in which value inside the ROi are equal to 1 and those outside are equal to 0....

get the actual position correspond to imfreehand

After you get the position, you can create a mask in which value inside the ROi are equal to 1 and those outside are equal to 0....

oltre 8 anni fa | 1

| accettato

Risposto

I get bad resolution when saving my plot with filled circles as .pdf or .eps

You might want to use <http://www.mathworks.com/help/matlab/ref/print.html print> instead of save, and set the resolution to som...

I get bad resolution when saving my plot with filled circles as .pdf or .eps

You might want to use <http://www.mathworks.com/help/matlab/ref/print.html print> instead of save, and set the resolution to som...

oltre 8 anni fa | 0

Risposto

Remove certain ticks on y-axis when plotting?

You can set directly the XTick property as follows: set(gca,'YTick',1:1:SomeNumber);

Remove certain ticks on y-axis when plotting?

You can set directly the XTick property as follows: set(gca,'YTick',1:1:SomeNumber);

oltre 8 anni fa | 0

| accettato

Risposto

How to correct p-value in statistical analysis?

With the Statistics Toolbox you want to use <http://www.mathworks.com/help/stats/multcompare.html mutcompare> for your statistic...

How to correct p-value in statistical analysis?

With the Statistics Toolbox you want to use <http://www.mathworks.com/help/stats/multcompare.html mutcompare> for your statistic...

oltre 8 anni fa | 0

| accettato

Risposto

How can I measure how many pixels a single irregular object has?

If you have the Image Processing Toolbox it looks like <http://www.mathworks.com/help/images/examples/correcting-nonuniform-illu...

How can I measure how many pixels a single irregular object has?

If you have the Image Processing Toolbox it looks like <http://www.mathworks.com/help/images/examples/correcting-nonuniform-illu...

oltre 8 anni fa | 0

Risposto

Select parts of number from a cell of many numbers to put in a variable?

The easy way would be: year = YourDate(1:4) month = YourDate(5:6) day = YourDate(7:8) Then you can convert to digi...

Select parts of number from a cell of many numbers to put in a variable?

The easy way would be: year = YourDate(1:4) month = YourDate(5:6) day = YourDate(7:8) Then you can convert to digi...

oltre 8 anni fa | 0

| accettato

Risposto

error when calculating factorial

The error is due to a missing bracket at the end of this line: C=factorial(m)/((factorial(n)*factorial(m-n)); Add a brac...

error when calculating factorial

The error is due to a missing bracket at the end of this line: C=factorial(m)/((factorial(n)*factorial(m-n)); Add a brac...

oltre 8 anni fa | 1

Risposto

Structure inside a while loop && pixel distance

Something like this? N = 10; YourStructure(N).result = zeros(15); % Initialize the structure for k = 1:N ...

Structure inside a while loop && pixel distance

Something like this? N = 10; YourStructure(N).result = zeros(15); % Initialize the structure for k = 1:N ...

oltre 8 anni fa | 0

| accettato

Risposto

How to eliminate the rows of data ?

If your data is stored in a cell array you could use the following: % Identify the rows (I) in which there are empty elemen...

How to eliminate the rows of data ?

If your data is stored in a cell array you could use the following: % Identify the rows (I) in which there are empty elemen...

oltre 8 anni fa | 0

Risposto

How to Perform an Operation on a Sequence of DICOM Images

You might want to look at <http://www.mathworks.com/company/newsletters/articles/accessing-data-in-dicom-files.html this> to get...

How to Perform an Operation on a Sequence of DICOM Images

You might want to look at <http://www.mathworks.com/company/newsletters/articles/accessing-data-in-dicom-files.html this> to get...

oltre 8 anni fa | 0

| accettato

Risposto

The max matrix of two matrices

Try this: C = arrayfun(@(x,y) max(x(:),y(:)),A,B)

The max matrix of two matrices

Try this: C = arrayfun(@(x,y) max(x(:),y(:)),A,B)

oltre 8 anni fa | 0

Risposto

Very simple logical question

A = cell(1,1000); for k = 1:1000 A{k} = sprintf('%04d',k); end

Very simple logical question

A = cell(1,1000); for k = 1:1000 A{k} = sprintf('%04d',k); end

oltre 8 anni fa | 1

Risposto

Show line above surf plot in 2D view

You could try to inverse the order of your axes' children after drawing the line, so that it comes up at the front and the plot ...

Show line above surf plot in 2D view

You could try to inverse the order of your axes' children after drawing the line, so that it comes up at the front and the plot ...

oltre 8 anni fa | 0

Risposto

creating numerical values from parts of a string read

If your strings are always of the same format, you can use regular expression to look for the colon followed by a number and fol...

creating numerical values from parts of a string read

If your strings are always of the same format, you can use regular expression to look for the colon followed by a number and fol...

oltre 8 anni fa | 0

| accettato

Risposto

How can ı set initial value about for statement ???

Maybe with something like this: for k = 1:100 % add your code if k== 20 % add you condition...

How can ı set initial value about for statement ???

Maybe with something like this: for k = 1:100 % add your code if k== 20 % add you condition...

oltre 8 anni fa | 0

Risposto

Getting the position of a value in a vector

YourVector = BAC(BAC_F<0.8) Then FirstValue = YourVector(1) Is that what you meant? If not it might simply be ...

Getting the position of a value in a vector

YourVector = BAC(BAC_F<0.8) Then FirstValue = YourVector(1) Is that what you meant? If not it might simply be ...

oltre 8 anni fa | 0

Risposto

Display image inside parfor loop

I'm afraid you can't control image display inside a parfor loop, i.e. inside individual workers. However you can store all the i...

Display image inside parfor loop

I'm afraid you can't control image display inside a parfor loop, i.e. inside individual workers. However you can store all the i...

oltre 8 anni fa | 0

| accettato

Risposto

Create new variable if elements of different variables match in Matlab

Here is something to get you started. It's not the most elegant but I think it answers your question. Note that I added NaN in s...

Create new variable if elements of different variables match in Matlab

Here is something to get you started. It's not the most elegant but I think it answers your question. Note that I added NaN in s...

oltre 8 anni fa | 0

Risposto

How do I use regexpi on a phrase that has a "*"?

If I understood right using \* instead of * should work.

How do I use regexpi on a phrase that has a "*"?

If I understood right using \* instead of * should work.

oltre 8 anni fa | 1

| accettato

Risposto

how to manage pop up menu entries

In the pushbutton callback you can add this code to populate the popup menu through its 'String' property: set(handles.Yo...

how to manage pop up menu entries

In the pushbutton callback you can add this code to populate the popup menu through its 'String' property: set(handles.Yo...

oltre 8 anni fa | 0

Risposto

How to get the facecolor of each bar?

Use the handles to the bar graph to retrieve its 'FaceColor' property. Eg: hbar1 = hbar(data,SomeColor); Then you ca...

How to get the facecolor of each bar?

Use the handles to the bar graph to retrieve its 'FaceColor' property. Eg: hbar1 = hbar(data,SomeColor); Then you ca...

oltre 8 anni fa | 0

| accettato

Risposto

guide push button and checkbox callback

Instead of using multiple if/else statements can you simply populate x directly with the values of the checkboxes: x = [get...

guide push button and checkbox callback

Instead of using multiple if/else statements can you simply populate x directly with the values of the checkboxes: x = [get...

oltre 8 anni fa | 0

Risposto

writevideo skipping last frame

Maybe use narr_anim(m).cdata in your loop? Other than that your code looks fine to me

writevideo skipping last frame

Maybe use narr_anim(m).cdata in your loop? Other than that your code looks fine to me

oltre 8 anni fa | 0

| accettato

Risposto

How do I use a for loop to return a vector

Hi Adam, you actually don't need a loop: P = x(x > 0); N = x(x < 0); P = 6.2000 11.0000 8.1000...

How do I use a for loop to return a vector

Hi Adam, you actually don't need a loop: P = x(x > 0); N = x(x < 0); P = 6.2000 11.0000 8.1000...

oltre 8 anni fa | 1

| accettato

Risposto

Find with an indexed struc

It might not be the most elegant but I think it would solve your problem Indices = cellfun(@(x) x == 0,struct2cell(M)) % yo...

Find with an indexed struc

It might not be the most elegant but I think it would solve your problem Indices = cellfun(@(x) x == 0,struct2cell(M)) % yo...

oltre 8 anni fa | 0

Risposto

Open second figure from GUI

Hi Carlos, In order to open a figure (let's say an input dialog box) after selecting a checkbox, you want to write the code...

Open second figure from GUI

Hi Carlos, In order to open a figure (let's say an input dialog box) after selecting a checkbox, you want to write the code...

oltre 8 anni fa | 0

Risposto

how can i cut data from a plot?

As Sara suggests, using ginput to let the user select a x-value from which to crop: clear clc x = 1:10*pi; ...

how can i cut data from a plot?

As Sara suggests, using ginput to let the user select a x-value from which to crop: clear clc x = 1:10*pi; ...

oltre 8 anni fa | 3

| accettato