Answered

Add Gaussian noise to mesh or point cloud

You can generate normally-distributed random values with randn. For a point cloud for example, if you have 100 points with x, y,...

Add Gaussian noise to mesh or point cloud

You can generate normally-distributed random values with randn. For a point cloud for example, if you have 100 points with x, y,...

6 months ago | 0

| accepted

Answered

Error when using createMask

Hi Manuel, A mask is created from an ROI (region of interest), not an image. First you need to create an ROI with drawellipse, ...

Error when using createMask

Hi Manuel, A mask is created from an ROI (region of interest), not an image. First you need to create an ROI with drawellipse, ...

6 months ago | 0

Answered

How to make a table and 2D graph of 3 variables?

I'm not sure about the "table" you want. Here's a simple example of how to define two vector values, then compute a 2D result an...

How to make a table and 2D graph of 3 variables?

I'm not sure about the "table" you want. Here's a simple example of how to define two vector values, then compute a 2D result an...

7 months ago | 0

Answered

Input dialog boxes accepts binary bit sequence

Hi Lorrenzo, MATLAB doesn't support binary representation. So when you run the above code, MATLAB thinks the value in temp2 is ...

Input dialog boxes accepts binary bit sequence

Hi Lorrenzo, MATLAB doesn't support binary representation. So when you run the above code, MATLAB thinks the value in temp2 is ...

7 months ago | 0

| accepted

Answered

Changing Axes direction with positive z-axis downwards

Hi Ryan, The first step is to change your second line to say f = figure(1); This gives you a handle to update the figure prop...

Changing Axes direction with positive z-axis downwards

Hi Ryan, The first step is to change your second line to say f = figure(1); This gives you a handle to update the figure prop...

7 months ago | 0

Answered

A code will prompt the user to try to guess my favourite colour and after 3 goes say 3 trials over, but i want to display a message after each incorrect attempt saying "Incorrect try again". How do I do this? (New user)

add the code disp('Incorrect try again') right before your very last end statement

A code will prompt the user to try to guess my favourite colour and after 3 goes say 3 trials over, but i want to display a message after each incorrect attempt saying "Incorrect try again". How do I do this? (New user)

add the code disp('Incorrect try again') right before your very last end statement

8 months ago | 0

Answered

extraction of a specific slice from the 3D shepp Logan phantom to reconstruct it

If it's a standard 3D array, you can do something like slice = image(:,:,64) to get the 64th slice.

extraction of a specific slice from the 3D shepp Logan phantom to reconstruct it

If it's a standard 3D array, you can do something like slice = image(:,:,64) to get the 64th slice.

8 months ago | 0

| accepted

Answered

Why is my graph coming out blank when i try and plot this code?

It's an error in your calcuation of y. Check the size and you'll see it's coming out as a scalar. Replace "/" with "./", since ...

Why is my graph coming out blank when i try and plot this code?

It's an error in your calcuation of y. Check the size and you'll see it's coming out as a scalar. Replace "/" with "./", since ...

8 months ago | 0

Answered

How do I change the function for certain points in a for loop

I suggest making an "other function" variable that has the values for which you want to use the other function. Then do an IF te...

How do I change the function for certain points in a for loop

I suggest making an "other function" variable that has the values for which you want to use the other function. Then do an IF te...

8 months ago | 0

| accepted

Answered

How to reference each element of a column vector in an if statement

Hi Brian, You need to use subscripts to index the Spin variable, as well as x. For example, if Spin(jj) <= .99999 Amou...

How to reference each element of a column vector in an if statement

Hi Brian, You need to use subscripts to index the Spin variable, as well as x. For example, if Spin(jj) <= .99999 Amou...

8 months ago | 0

Answered

How do I plot the angle

Hi Umut, This is a neat problem! Some nice physics with rectangular-to-polar conversions and trig asymptotes. My code to solve ...

How do I plot the angle

Hi Umut, This is a neat problem! Some nice physics with rectangular-to-polar conversions and trig asymptotes. My code to solve ...

9 months ago | 1

| accepted

Answered

Deleting Entries in an Array

Hi Ramitha, You almost got it. For your last line of code, try A(vals,:)=[]; The way you tried it at first uses linear lindex...

Deleting Entries in an Array

Hi Ramitha, You almost got it. For your last line of code, try A(vals,:)=[]; The way you tried it at first uses linear lindex...

9 months ago | 1

| accepted

Answered

Bounding Boxes at any points

Hi arun, Here's some code to do what you asked, but with everything in units of the graph/plot (not mixing mm / pixel coordinat...

Bounding Boxes at any points

Hi arun, Here's some code to do what you asked, but with everything in units of the graph/plot (not mixing mm / pixel coordinat...

9 months ago | 0

| accepted

Answered

2d coordinate transformation specified origin matlab

Hi Reuben, You're almost there. The basic idea is to subtract the rotation point value from the target point, so that you ARE ...

2d coordinate transformation specified origin matlab

Hi Reuben, You're almost there. The basic idea is to subtract the rotation point value from the target point, so that you ARE ...

9 months ago | 0

| accepted

Answered

how to plot image signal ?

Hi Tim, Try replacing "plot" with "imshow". Also need to remove the quotes from the second command in the last line... subplot...

how to plot image signal ?

Hi Tim, Try replacing "plot" with "imshow". Also need to remove the quotes from the second command in the last line... subplot...

9 months ago | 1

Answered

How can i detect max value and his index ?

Let's say your vector is a =[1 2 5 NaN NaN 9 0 23 12 NaN NaN NaN 6 2 8] Then the m...

How can i detect max value and his index ?

Let's say your vector is a =[1 2 5 NaN NaN 9 0 23 12 NaN NaN NaN 6 2 8] Then the m...

9 months ago | 0

Answered

how to create this matrix?

Hi diadalina, I think it would look something like this... iLength = 5; %rows jLength = 7; %cols b=zeros(iLength, jLengt...

how to create this matrix?

Hi diadalina, I think it would look something like this... iLength = 5; %rows jLength = 7; %cols b=zeros(iLength, jLengt...

10 months ago | 0

| accepted

Answered

Read mixed numbers in Matlab

Here's some code to read the data in as a table, then update the mixed number values in each row to the decimal... T = readtabl...

Read mixed numbers in Matlab

Here's some code to read the data in as a table, then update the mixed number values in each row to the decimal... T = readtabl...

10 months ago | 0

Answered

"cleaning" a horizontal line removal code for object detection.

Hi Janrex, For a nice clean image like this, there's a very simple solution. Just compute a row sum; rows with staff lines have...

"cleaning" a horizontal line removal code for object detection.

Hi Janrex, For a nice clean image like this, there's a very simple solution. Just compute a row sum; rows with staff lines have...

10 months ago | 0

| accepted

Answered

keep the number give by bwlabel to one object constant in all images of an image sequence

Hi Sofia, I assume these 10 images are related; that they show a changing field. I think the only way to do what you want is t...

keep the number give by bwlabel to one object constant in all images of an image sequence

Hi Sofia, I assume these 10 images are related; that they show a changing field. I think the only way to do what you want is t...

10 months ago | 0

Answered

how can i make the result number from convolution become positive?

Convolution results can be negative. If you want only positive results, two options are to either take the absolute value of th...

how can i make the result number from convolution become positive?

Convolution results can be negative. If you want only positive results, two options are to either take the absolute value of th...

10 months ago | 0

Answered

Undefined function 'int' for input arguments of type 'char'. keep getting error using matlab2015b

In the first line you define an eqution as a text string (in quotes). Then in the second line you pass that text string into the...

Undefined function 'int' for input arguments of type 'char'. keep getting error using matlab2015b

In the first line you define an eqution as a text string (in quotes). Then in the second line you pass that text string into the...

10 months ago | 0

Answered

Issue with table data creating strings and recognising as numbers

Hi Hannah, Try replacing, for example, nTxc=c(:,2)); with nTxc=a.cmes100917(:,2).mag_magnetic_field_mso_xnT; (I used tab ...

Issue with table data creating strings and recognising as numbers

Hi Hannah, Try replacing, for example, nTxc=c(:,2)); with nTxc=a.cmes100917(:,2).mag_magnetic_field_mso_xnT; (I used tab ...

11 months ago | 0

Answered

Beginner question about for loops and indexing

Hi Callum, You're really close. First, you can move the "r = ... " line outside the loop to do the operation on the whole arra...

Beginner question about for loops and indexing

Hi Callum, You're really close. First, you can move the "r = ... " line outside the loop to do the operation on the whole arra...

11 months ago | 0

| accepted