Answered

Question regarding matrix index

Hi jana, Try this: X = [1 2 3 4 5; 3 inf 5 7 inf; 5 6 7 inf inf; 2 3 4 9 1] [val, rowNum] = ...

Question regarding matrix index

Hi jana, Try this: X = [1 2 3 4 5; 3 inf 5 7 inf; 5 6 7 inf inf; 2 3 4 9 1] [val, rowNum] = ...

mehr als 5 Jahre ago | 0

Answered

Get new variable with elements from a double matrix & cell array given a specific condition

Hi Maria, This code should do what you're looking for: A = { '19970102' '00000127' 'MORRISON' '00148' 'BA' '199701...

Get new variable with elements from a double matrix & cell array given a specific condition

Hi Maria, This code should do what you're looking for: A = { '19970102' '00000127' 'MORRISON' '00148' 'BA' '199701...

mehr als 5 Jahre ago | 0

| accepted

Answered

identifying number on dice

Hi Sameer, Here's what I would do. It's a little like IA's bwareaopen suggestion. It tries to make minimal assumptions other th...

identifying number on dice

Hi Sameer, Here's what I would do. It's a little like IA's bwareaopen suggestion. It tries to make minimal assumptions other th...

mehr als 5 Jahre ago | 0

| accepted

Answered

Please help create a transition matrix

Hi Ella, The code below should do what you're looking for. I displayed the result as an image but you can just look at the fi...

Please help create a transition matrix

Hi Ella, The code below should do what you're looking for. I displayed the result as an image but you can just look at the fi...

mehr als 5 Jahre ago | 1

| accepted

Answered

Creating an array without mesgrid

You're very close: for i=1:3 for j=1:3 X(i,j)=j; Y(i,j)=i; end end No...

Creating an array without mesgrid

You're very close: for i=1:3 for j=1:3 X(i,j)=j; Y(i,j)=i; end end No...

mehr als 5 Jahre ago | 1

| accepted

Answered

Finding signal to noise ratio

Hi Tinkul, does this help you out? I assume that the values you gave are already in your desired units (although true SNR is bas...

Finding signal to noise ratio

Hi Tinkul, does this help you out? I assume that the values you gave are already in your desired units (although true SNR is bas...

mehr als 5 Jahre ago | 1

| accepted

Answered

how to simplify connected blobs

Hi Sukuchha, please see <http://blogs.mathworks.com/steve/2014/03/27/comparing-the-geometries-of-bwboundaries-and-poly2mask/#com...

how to simplify connected blobs

Hi Sukuchha, please see <http://blogs.mathworks.com/steve/2014/03/27/comparing-the-geometries-of-bwboundaries-and-poly2mask/#com...

mehr als 5 Jahre ago | 0

Submitted

interpmask - interpolate (tween) logical masks

interpmask interpolates (or tweens) masks to transition smoothly between shapes in masks

mehr als 5 Jahre ago | 2 downloads |

Answered

how to simplify connected blobs

Hi Sukuchha, I think that you just need to do this: XY = [0 0; 1 0; 1 1; 0 1]; % unclosed XY points XY_closed = XY(...

how to simplify connected blobs

Hi Sukuchha, I think that you just need to do this: XY = [0 0; 1 0; 1 1; 0 1]; % unclosed XY points XY_closed = XY(...

mehr als 5 Jahre ago | 0

| accepted

Answered

How to write a function that returns the element that is the center of a vector or matrix?

Hi Kimberly, try this: % Set up some input x = [1 2 3 4 5 8 1 1 2] % Grab the middle column(s) x...

How to write a function that returns the element that is the center of a vector or matrix?

Hi Kimberly, try this: % Set up some input x = [1 2 3 4 5 8 1 1 2] % Grab the middle column(s) x...

fast 6 Jahre ago | 1

Answered

Output matrix for simple function

Hi Derek, MATLAB has some useful ways to do what you're trying to do. If you use the (.*) operator instead of (*), it will pe...

Output matrix for simple function

Hi Derek, MATLAB has some useful ways to do what you're trying to do. If you use the (.*) operator instead of (*), it will pe...

fast 6 Jahre ago | 0

Answered

How can I calculate the perimeters of Delaunay triangles?

Hi ZhG, Here is some code that shows a few different ways of getting the perimeter of triangles. It first just shows the leng...

How can I calculate the perimeters of Delaunay triangles?

Hi ZhG, Here is some code that shows a few different ways of getting the perimeter of triangles. It first just shows the leng...

fast 6 Jahre ago | 1

Answered

2D Plotting With Non Numeric X Axis

Hi Dan, Try this code, there's a *dateaxis* command perfect for what you want: xVals = datenum(0,1:12,1); % The first da...

2D Plotting With Non Numeric X Axis

Hi Dan, Try this code, there's a *dateaxis* command perfect for what you want: xVals = datenum(0,1:12,1); % The first da...

fast 6 Jahre ago | 0

Answered

Problem of inserting values into array within a for loop

Hi Kornelia, This one has a straight forward answer. perimeterLength = regionprops(blob, 'Perimeter'); will always re...

Problem of inserting values into array within a for loop

Hi Kornelia, This one has a straight forward answer. perimeterLength = regionprops(blob, 'Perimeter'); will always re...

fast 6 Jahre ago | 0

| accepted

Answered

How can I share image data between callbacks?

Hi Saurabh, This one has a simple solution. Note the call in your first function: handles.pushbutton1 = imread(uigetfile...

How can I share image data between callbacks?

Hi Saurabh, This one has a simple solution. Note the call in your first function: handles.pushbutton1 = imread(uigetfile...

fast 6 Jahre ago | 0

Answered

Performing stats on subsections of a matrix

Hi Swisslog, Try this: a = [1 1 1 2 2 4; 3 5 4 7 2 5]; % Pack your matrix contents into a cell array [unqA,~,grps]...

Performing stats on subsections of a matrix

Hi Swisslog, Try this: a = [1 1 1 2 2 4; 3 5 4 7 2 5]; % Pack your matrix contents into a cell array [unqA,~,grps]...

fast 6 Jahre ago | 0

| accepted

Answered

Why is my surf animation so slow?

Hi Phil, There are a few things you can do to speed this up. Firstly, the *pause* command will force your loop to sit idle...

Why is my surf animation so slow?

Hi Phil, There are a few things you can do to speed this up. Firstly, the *pause* command will force your loop to sit idle...

fast 6 Jahre ago | 0

| accepted

Answered

How do I change Grid Size in R2013a?

Hi Edgar, You can set the *XTick* locations of an axis (or the current one via *gca*) directly: tickValues = min(x):0.1:...

How do I change Grid Size in R2013a?

Hi Edgar, You can set the *XTick* locations of an axis (or the current one via *gca*) directly: tickValues = min(x):0.1:...

fast 6 Jahre ago | 1

Submitted

dbarray - pack and unpack database arrays to matlab arrays

dbarray lets you directly send/fetch array[] type database fields into native MATLAB variables

fast 6 Jahre ago | 4 downloads |

Answered

Contributors metainfo: reputation and more

*Recent news:* ... and *BAM!* Walter hits *25,000*! Congratulations are in order again. It's impressive to see, but depressin...

Contributors metainfo: reputation and more

*Recent news:* ... and *BAM!* Walter hits *25,000*! Congratulations are in order again. It's impressive to see, but depressin...

fast 6 Jahre ago | 4

Answered

how to project images on the side walls of a 3D surf plot

Hi Konstantinos, Does this code get you on your way? R = 0:0.1:1; z = cos(-R); % that'd be your current y-f...

how to project images on the side walls of a 3D surf plot

Hi Konstantinos, Does this code get you on your way? R = 0:0.1:1; z = cos(-R); % that'd be your current y-f...

fast 6 Jahre ago | 1

| accepted

Answered

What's on your personal MATLAB to-do list?

A triangulation3d class which would basically inherit the standard triangulation class, but add useful features specifically for...

What's on your personal MATLAB to-do list?

A triangulation3d class which would basically inherit the standard triangulation class, but add useful features specifically for...

fast 6 Jahre ago | 2

Question

What's on your personal MATLAB to-do list?

What MATLAB tools or functions have you been thinking about making but haven't quite gotten around to it? It can be something...

fast 6 Jahre ago | 5 answers | 2

Answered

Reading lines from a text file and storing them into an array.

Hi Surush, The trick is to put each line in an element of a cell array. Here's some commented code that does what you're t...

Reading lines from a text file and storing them into an array.

Hi Surush, The trick is to put each line in an element of a cell array. Here's some commented code that does what you're t...

fast 6 Jahre ago | 6

| accepted

Submitted

surf2solid - make a solid volume from a surface for 3D printing

Turns thin surfaces into closed solids by adding a flat base or offsetting by a given thickness.

fast 6 Jahre ago | 37 downloads |

Answered

Error using surf() with colorbar and title

Hi Christian, try this: opengl('software') figure,surf(magic(99)),colorbar,title('Va') Does that sort it out as well?...

Error using surf() with colorbar and title

Hi Christian, try this: opengl('software') figure,surf(magic(99)),colorbar,title('Va') Does that sort it out as well?...

etwa 6 Jahre ago | 0

Solved

Indexed Probability Table

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

etwa 6 Jahre ago

Solved

Duplicate each element of a vector.

for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

etwa 6 Jahre ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

etwa 6 Jahre ago

Answered

How to execute a function after the value of a property changed? Problems with callback function

If all of the observation of *PMV* is done by the *RB* class itself, so there's actually a better/cleaner way to do what you're ...

How to execute a function after the value of a property changed? Problems with callback function

If all of the observation of *PMV* is done by the *RB* class itself, so there's actually a better/cleaner way to do what you're ...

etwa 6 Jahre ago | 0