Answered
Number of pixel, image outline and image processing
doc bwconncomp doc regionprops doc bwarea

14 years ago | 1

| accepted

Answered
Resume after Pausing (uicontrol)
This is simple with timers. doc timer

14 years ago | 0

Answered
Using colon operator to create evenly spaced vectors for individual elements of arrays simply and without looping
A=[1,2,3; 4,5,6]; B=[12,13,14; 15,16,17] C = cellfun(@(x,y)x:y,num2cell(A),num2cell(B),'uni',false) No guarantees i...

14 years ago | 1

| accepted

Answered
End function when a value is reached
You could use a |while|-loop with the condition or a |for|-loop that contains an |if| condition met, |break|. doc while ...

14 years ago | 0

| accepted

Answered
matrix manipulation
<http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F FAQ: A1 A2 An in a loop> Don't...

14 years ago | 1

Answered
what does a strfind return?
doc isempty for the emptiness test

14 years ago | 0

| accepted

Answered
Trend lines
Perhaps |polyfit()| and |polyval()|? doc polyfit doc polyval

14 years ago | 0

| accepted

Answered
How to implement matlab program for constant modulus algorithm
<http://www.mathworks.com/help/releases/R2011b/toolbox/comm/ref/cma.html doc cma>

14 years ago | 0

| accepted

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

14 years ago

Answered
How to Select one element from each row of a matrix A based on a column matrix B.
You could use |sub2ind()|: idx = sub2ind(size(A),(1:numel(B)).',B); %not tested in ML AB = A(idx); for more info: ...

14 years ago | 2

Answered
Plot separate data points in different colors
With a for-loop: x=[2 5 8 9 3 4 6 4 8 1]; c = [0.1 0.5 0.4 0.2 0.9 0.6 0.8 0.2 0.3 0.1]; threeones = [1 1 1]; for ii = 1...

14 years ago | 0

Answered
How to get the input variable names of a function (as cell array)
I know of no way to do this with |varargin|. If it's really important you could pass in a cell array of names as another input....

14 years ago | 0

Answered
Optimization Toolbox
|fmincon| should be able to handle that no problem.

14 years ago | 0

Answered
Clearing axes using created pushbutton in S-function
Why not just use |@cla| ? You not only overwrite the VERY IMPORTANT function |clear|, but you disguise what you're doing. Also...

14 years ago | 1

| accepted

Answered
Dicom Header Editing & Image Intensity Scaling for output
X = dicomread('CT-MONO2-16-ankle.dcm'); metadata = dicominfo('CT-MONO2-16-ankle.dcm'); metadata.PatientID = '12343'; dicomw...

14 years ago | 0

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

14 years ago

Answered
Introducing a border/outline to objects in an image.
I would guess one of these will be your friend: doc bwperim doc bwboundaries doc bwtraceboundary

14 years ago | 0

Answered
Replicating rows/columns within a matrix, kron function
kron([3 4; 5 6],ones(3,1))

14 years ago | 0

| accepted

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

14 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

14 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

14 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

14 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

14 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

14 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

14 years ago

Answered
3D body plot ( visualization )
The output from: fv = isosurface(v,0); patch(fv); Is expected, i.e. each object (voxel) is being patched. Since you wa...

14 years ago | 0

| accepted

Answered
image inpainting
<http://www.mathworks.com/matlabcentral/fileexchange/4551-inpaintnans John's Inpaint Nans>

14 years ago | 0

Answered
popupmenu in GUI
Press return in the string option in GUIDE to start new lines. Programatically, use a cellarray of strings for the string opt...

14 years ago | 0

| accepted

Answered
Varying two dependent variables
or use |min()| and |max()| to operate the saturation. b = min(max(-10:10,-5),5)

14 years ago | 0

Answered
Creating multidimentional structures
s = struct('f1', num2cell(rand(100)), 'f2', 25); You'll need 10000 data points. Above you provided 200.

14 years ago | 0

| accepted

Load more