Hi, I'm nobody.

I don't belong here, but I have nothing better to do.

Matlab used to be part of my work.

Now it's part of my hobbies.

That's pretty sad, really.

Question

Is there a way to report/flag submissions on the File Exchange?

This isn't the first time I've run into this, but is there a way to do anything about such things other than rating/tagging? The...

ungefär 19 timmar ago | 2 answers | 0

Answered

Plot image on different axes

Consider the example: inpict = zeros(250); inpict(50:100,150:200) = 0.6; x = linspace(-10*pi,10*pi,1000); y = sin(x)+x; ...

Plot image on different axes

Consider the example: inpict = zeros(250); inpict(50:100,150:200) = 0.6; x = linspace(-10*pi,10*pi,1000); y = sin(x)+x; ...

en dag ago | 0

Answered

Find an index of a cell whose element satisfies a condition

This is one way: c = {[1,2,3], [2,3,1], [3,1,2], [1,2,3], [2,3,1], [3,1,2]}; idx = find(cellfun(@(x) x(2)==1,c))

Find an index of a cell whose element satisfies a condition

This is one way: c = {[1,2,3], [2,3,1], [3,1,2], [1,2,3], [2,3,1], [3,1,2]}; idx = find(cellfun(@(x) x(2)==1,c))

en dag ago | 1

Answered

What is the best approach to find a smaller matrix within a larger matrix (may not be identical, but need region if highest match)??

This isn't really a good answer, since I can't offer an explanation of why it works differently, but it works if I do it like th...

What is the best approach to find a smaller matrix within a larger matrix (may not be identical, but need region if highest match)??

This isn't really a good answer, since I can't offer an explanation of why it works differently, but it works if I do it like th...

en dag ago | 0

Answered

How to split a large image into many small images?

Blockwise filtering has already been mentioned; since I don't know if that applies to your needs and I have no familiarity with ...

How to split a large image into many small images?

Blockwise filtering has already been mentioned; since I don't know if that applies to your needs and I have no familiarity with ...

3 dagar ago | 0

Answered

Generate random integers that sums to a specific number within a specific range

I've been wasting time on trying to do something similar lately. I can't believe I missed this question. For my own purposes, ...

Generate random integers that sums to a specific number within a specific range

I've been wasting time on trying to do something similar lately. I can't believe I missed this question. For my own purposes, ...

3 dagar ago | 0

Answered

calculating centroids of multiple ROIs at a time

If you have the binarized image, just use regionprops. inpict = imread('blobs.png'); % standard test image S = regionprops(...

calculating centroids of multiple ROIs at a time

If you have the binarized image, just use regionprops. inpict = imread('blobs.png'); % standard test image S = regionprops(...

5 dagar ago | 0

| accepted

Answered

How to index one array by assigned vector in certain dimension

There are probably multiple ways of doing this. It could probably be done with a bunch of reshaping and such, but I did it this...

How to index one array by assigned vector in certain dimension

There are probably multiple ways of doing this. It could probably be done with a bunch of reshaping and such, but I did it this...

5 dagar ago | 1

Answered

I need help with pixel neighborhood operations

If you have Image Processing Toolbox, you likely don't need to resort to any sort of pointwise looping code. Most such operatio...

I need help with pixel neighborhood operations

If you have Image Processing Toolbox, you likely don't need to resort to any sort of pointwise looping code. Most such operatio...

7 dagar ago | 0

| accepted

Answered

Extracting all possible vectors from a big vector

Sure they're vectors. v=[1 2 3 4]; v = uint16(v); % there's no point doing this repeatedly in the loop C = {}; for k = 1:n...

Extracting all possible vectors from a big vector

Sure they're vectors. v=[1 2 3 4]; v = uint16(v); % there's no point doing this repeatedly in the loop C = {}; for k = 1:n...

8 dagar ago | 0

| accepted

Answered

Change output view of pin cushion distortion

Maybe try something like s = r - (b/rmax.^2)*r.^3; % this is the same as before s = s/(max(s(:))/rmax); % or use whatever scal...

Change output view of pin cushion distortion

Maybe try something like s = r - (b/rmax.^2)*r.^3; % this is the same as before s = s/(max(s(:))/rmax); % or use whatever scal...

8 dagar ago | 0

| accepted

Answered

Hello, can anyone solve this preallocation problem in my code?

You had allocated an empty vector and were growing it by concatenation. It works, but is often slower. Since you know the size...

Hello, can anyone solve this preallocation problem in my code?

You had allocated an empty vector and were growing it by concatenation. It works, but is often slower. Since you know the size...

8 dagar ago | 0

| accepted

Answered

Weird output image after applying mask

The output of edge() is logical. When roifilt2() goes to composite the filtered and original images, this causes the non-filter...

Weird output image after applying mask

The output of edge() is logical. When roifilt2() goes to composite the filtered and original images, this causes the non-filter...

8 dagar ago | 1

| accepted

Answered

How to calculate entropy of a DICOM image (16-bit depth)?

Just open up entropy() or look at the docs to see how it works. % just grab some image and make it into an example inpict = ...

How to calculate entropy of a DICOM image (16-bit depth)?

Just open up entropy() or look at the docs to see how it works. % just grab some image and make it into an example inpict = ...

8 dagar ago | 0

| accepted

Answered

I have 4 bits combinations, and I want to change the size of the matrix HT depending on these combinations, the description below

Not sure how you want to handle HT, but here goes: n = 4; %number of bits % don't need all those loops A = dec2bin(0:2^n-1)...

I have 4 bits combinations, and I want to change the size of the matrix HT depending on these combinations, the description below

Not sure how you want to handle HT, but here goes: n = 4; %number of bits % don't need all those loops A = dec2bin(0:2^n-1)...

8 dagar ago | 0

| accepted

Answered

My pictures have a format of [227 227 1] so I had the idea to triplicate my processed pictures and put them back into one to get a format of [227 227 3], how can I do this?

To rearrange a single-channel intensity image into a grayscale RGB image, you can just do Argb = repmat(Aint,[1 1 3]); I don't...

My pictures have a format of [227 227 1] so I had the idea to triplicate my processed pictures and put them back into one to get a format of [227 227 3], how can I do this?

To rearrange a single-channel intensity image into a grayscale RGB image, you can just do Argb = repmat(Aint,[1 1 3]); I don't...

8 dagar ago | 0

Answered

How to do OR operation of two images (DFT and Binary)?

I'm not sure what you're actually trying to do. Your description makes sense, but you're doing the bitwise OR of a logical imag...

How to do OR operation of two images (DFT and Binary)?

I'm not sure what you're actually trying to do. Your description makes sense, but you're doing the bitwise OR of a logical imag...

8 dagar ago | 0

Answered

How do I code this for loop?

I don't know how you're getting anything out of it, since the index isn't even being used. You could do this: vd_inc = 1:100; ...

How do I code this for loop?

I don't know how you're getting anything out of it, since the index isn't even being used. You could do this: vd_inc = 1:100; ...

9 dagar ago | 0

| accepted

Answered

Remove Grid Lines from a Graph

It depends what you want and what you expect. If all you want is one or two pictures, it's by far easier to do this manually ou...

Remove Grid Lines from a Graph

It depends what you want and what you expect. If all you want is one or two pictures, it's by far easier to do this manually ou...

9 dagar ago | 0

Answered

error while running watershed

I don't know how you'd be getting that error unless there's a problem with conndef.m Maybe it's being shadowed, so check the pa...

error while running watershed

I don't know how you'd be getting that error unless there's a problem with conndef.m Maybe it's being shadowed, so check the pa...

9 dagar ago | 1

Answered

How can I divide the colorbar into just two ranges?

One way is to specify the colormap and caxis(); consider the example [x y z] = sphere(30); surf(x,y,z); axis equal datar...

How can I divide the colorbar into just two ranges?

One way is to specify the colormap and caxis(); consider the example [x y z] = sphere(30); surf(x,y,z); axis equal datar...

9 dagar ago | 0

Answered

How do I leave the answer in real number form instead of natural exponents

That appears to be a symbolic vector. You should just be able to do double(gradientdescent) and get a plain numeric result

How do I leave the answer in real number form instead of natural exponents

That appears to be a symbolic vector. You should just be able to do double(gradientdescent) and get a plain numeric result

13 dagar ago | 1

| accepted

Answered

Reverse calculation for weighted average

Let's say we're trying to back calculate x= [a b c d e] that were used to generate the mean and sum. Is there a way to solve fo...

Reverse calculation for weighted average

Let's say we're trying to back calculate x= [a b c d e] that were used to generate the mean and sum. Is there a way to solve fo...

14 dagar ago | 1

| accepted

Answered

program that reads the color value in the CIE xyz color space and represents it on 3d space coordinates

Maybe this is of use. % generate two clusters of color points lab1 = randn(100,3).*[40 10 20] + [40 -40 40]; lab2 = randn(1...

program that reads the color value in the CIE xyz color space and represents it on 3d space coordinates

Maybe this is of use. % generate two clusters of color points lab1 = randn(100,3).*[40 10 20] + [40 -40 40]; lab2 = randn(1...

14 dagar ago | 0

Answered

not enough input arguments

The error is occurring because you're not providing the function odDetect with any arguments. A function will throw the error o...

not enough input arguments

The error is occurring because you're not providing the function odDetect with any arguments. A function will throw the error o...

14 dagar ago | 0

Answered

How to run a for loop with two functions (nested for loop?)

Pretty sure that you're just intending to process alpha one element at a time, so just do that. Of course, you're overwriting a...

How to run a for loop with two functions (nested for loop?)

Pretty sure that you're just intending to process alpha one element at a time, so just do that. Of course, you're overwriting a...

15 dagar ago | 0

| accepted

Answered

how can I plot the intersection of two cylinders?

Like everything, there are probably better ways, especially to get the edges closed. The simple way is to just plot the surface...

how can I plot the intersection of two cylinders?

Like everything, there are probably better ways, especially to get the edges closed. The simple way is to just plot the surface...

15 dagar ago | 0

| accepted

Answered

It can't read an image, it says the path does not exist even though the path does exist

Nobody here can guess the contents of the index file you're reading or the actual filenames on your disk. You can start by gene...

It can't read an image, it says the path does not exist even though the path does exist

Nobody here can guess the contents of the index file you're reading or the actual filenames on your disk. You can start by gene...

16 dagar ago | 0

Answered

Subtraction of cell values with a fixed value

You could use cellfun() if you wanted. s = [1 39]; A = randi([1 20],s(1),s(2)); k = 100; % the number to subtract blocksiz...

Subtraction of cell values with a fixed value

You could use cellfun() if you wanted. s = [1 39]; A = randi([1 20],s(1),s(2)); k = 100; % the number to subtract blocksiz...

16 dagar ago | 0

| accepted

Answered

For loop to create a new matrix taking a cluster of columns from existing matrix

Blockwise sum along dim 2 using a cell array s = [1300 36]; % set the array size FR_mat = randi([1 20],s(1),s(2)); C = mat2...

For loop to create a new matrix taking a cluster of columns from existing matrix

Blockwise sum along dim 2 using a cell array s = [1300 36]; % set the array size FR_mat = randi([1 20],s(1),s(2)); C = mat2...

16 dagar ago | 1

| accepted