Answered
??? Subscript indices must either be real positive integers or logicals.
I think you have theta and asin reversed in the first for-loop theta(..) = asin(..)

15 years ago | 0

| accepted

Answered
finding neighbor of a position
idx = find(conv2(double(I==5),ones(3),'same')) %This includes the 6, but that could easily be taken care of with |setdiff|. ...

15 years ago | 2

Answered
How should I scratch this ticket?
My own idea; thought of from a thread yesterday: function [idx nreps] = luckyN %Function to pick which numbers will give me t...

15 years ago | 1

Question


How should I scratch this ticket?
One of our local car dealers is having a promotion where they give out scratch tickets. The rules are simple - scratch any six ...

15 years ago | 14 answers | 2

14

answers

Answered
help me please
X = rand(10000,50,6); [v,v] = sort(X,3); plot([sum(sum(v(:,:,1:2),3)==7);repmat(1/5*10000,1,50)]'); legend('Experimental','Ide...

15 years ago | 0

Answered
Matlab Code to detect Tumors
<http://www.mathworks.com/matlabcentral/fileexchange/26557> might be somewhere to start. No offense, but some of the most br...

15 years ago | 0

| accepted

Answered
Bitmap contrast issue
Are you sure it's not reading them correctly but you're just viewing a small range? try: imshow(imread('example.bmp'),[]); %...

15 years ago | 0

| accepted

Answered
??? Attempted to access l(0); index must be a positive integer or logical.
L(0) doesn't exist since MATLAB doesn't use zero-based indexing. You can only go to L(1)

15 years ago | 1

| accepted

Answered
surface plot of a function
You're using an isovalue of zero, that means everything above zero is true. The range of F is >> [min(F(:)) max(F(:))] ...

15 years ago | 0

Answered
if else
idx = ismember(I,s,'rows'); %row indices of matches nmatches = sum(idx); %number of matches row_indices = find(idx); %row nu...

15 years ago | 0

Answered
How to extract simillar values from 2 arrays of different length which has same max and min values?
doc histc %to separate similar values into bins doc accumarray %to do stuff with the values in the bins doc bsxfun %to find...

15 years ago | 0

| accepted

Answered
Whether a given point is inside or outside a non-convex 3D tessellated (triangular mesh/ STL file) object?
You could "voxelize" it using this tool: <http://www.mathworks.com/matlabcentral/fileexchange/27390-mesh-voxelisation FEX:vox...

15 years ago | 0

Answered
Moving Avg calculation
It's fairly well explained in doc movavg I would recommend using |conv| anyway. <http://www.mathworks.com/matlabcentra...

15 years ago | 0

Answered
Plotting a 2D matrix
doc surf doc mesh doc plot3 to name a few visualization tools. You CAN fit a function to it, will it be a good fit? ...

15 years ago | 0

| accepted

Answered
bit mapping
I just answered this in your duplicate post. Change the |max| function to |min| everything else is identical.

15 years ago | 0

Answered
Beginner's roblems with arrays
I'm not getting any errors after I add a few parenthesis: K = 130; V = [0.9 0 .5]; THETA = [pi/4 0 3*pi/4]; T = [0 33 5...

15 years ago | 0

Answered
euclidean distance,output
I have no idea how the above is organized but if it's just an nx2 array: C = [010 0.154 011 .256 100 0.472 111 .0...

15 years ago | 0

Answered
Image centroid in matlab
You might want to read this: <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F F...

15 years ago | 0

Answered
reshaping
s= zeros(1,numel(A)+numel(B)) s(2:2:end) = B; s(1:2:end) = A; ?

15 years ago | 0

Answered
Bounding circle for objects in binary image?
Use the distance transform on the inverse of the image. The point that is the largest value on each object will be the centroid...

15 years ago | 2

| accepted

Answered
Working with large Matlab figures in Word
I know it sounds lame, but I usually just use a screenshot.

15 years ago | 0

Answered
Converting image to suitable form?
I personally always try to work a logical map of the target. This segments the hand and gives you a logical map and a map edge ...

15 years ago | 1

| accepted

Answered
isosurface on 3d unstructured triangular grid?
Use |patch| directly with your triangular data.

15 years ago | 0

Answered
Matrix/Image Merging
*Repaste* New trix every time! clear Merge A=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15]; B=[16 17 18 19 20 21; 22 23 24 25 26...

15 years ago | 1

| accepted

Answered
Image rotate
Irot = imrotate(I,theta); Mrot = ~imrotate(true(size(I)),theta); Irot(Mrot&~imclearborder(Mrot)) = 255; %View 'er imtool(Ir...

15 years ago | 5

| accepted

Answered
Output of every loop calculation to be used as vector.
y = zeros(n,1); for ii = 1:n y(ii) = some_value_of_x(possibly(ii)) end

15 years ago | 0

Answered
What is the largest allowable size of matrices and vectors to pass to mldivide?
No, there is no limit. Does your stiffness matrix have boundary conditions applied? *EDIT* example for clarification K = [1...

15 years ago | 0

Answered
IMAGE PROCESSING-DETECTING RED AND BLUE SPOTS
Set a lower threshold on the red or blue channel and an upper on the other two blueish_mask = rgb(:,:,3)>(rgb(:,:,1)+20)&rg...

15 years ago | 0

Answered
colon operator : problem
<http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F FAQ>

15 years ago | 1

| accepted

Load more