# DGM

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.

**Statistics**

RANK**48**

of 250,085

REPUTATION**3,114**

CONTRIBUTIONS

**25** Questions

**1,145** Answers

ANSWER ACCEPTANCE **
60.0%
**

VOTES RECEIVED**332**

RANK**2,018** of 17,374

REPUTATION**814**

AVERAGE RATING**5.00**

CONTRIBUTIONS**8** Files

DOWNLOADS **82**

ALL TIME DOWNLOADS**5567**

RANK

of 103,767

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

I have created an algorithm for a median RGB image filter, however, it doesn't seem to be working.

I don't know why you're using a weighting array that doesn't exist, but since you say this is a median filter, I'm going to assu...

18 hours ago | 0

| accepted

How to divide a sequence into 8 groups?

I am going to assume that your "data" is a long character vector with no delimiters. v = char(randi([48 57],1,64)) % example ve...

19 hours ago | 0

| accepted

Why am i getting two different MSE, while using formula and syntax immse?

The reason is that the two images are integer-class. The difference and square may result in data truncation. moving_img = imr...

21 hours ago | 1

| accepted

Hide RGB image in gray scale image using LSB Replacement

Here. You either need a much larger host image, or you need to reduce the payload size. The payload can be reduced by reducing...

23 hours ago | 0

how to make my graph in center without moving it or dragging it to the center

There's no need for all this code repetition. The cases should not be nested. Create the unmodified vectors, create the modifie...

1 day ago | 0

| accepted

Frosty Filter: To create effect like frosted glass

There isn't really a tool made for this within IPT or base MATLAB. You can certainly roll your own, or you could write a small ...

3 days ago | 1

plotting x y cartesian coordinates

This isn't the core of the problem, but the way you wrote the x and y vectors causes them to be stored as 4x3 matrices. When yo...

3 days ago | 0

Is applying a binary operator (+,-,*,/) to char arrays supported by MATLAB or just a "trick"

MATLAB is a weakly-typed language; consequently, implicit type conversions tend to happen all the time. I don't know where (or ...

3 days ago | 0

How to go back to the input in a if?

This is a start %M=Righe della matrice A m = 4; %N=Colonne della matrice A nrange = [3 13]; % pull parameters out for fle...

3 days ago | 0

How to detect percentage of a color range inside an Image?

Something like this: A = imread('coloredChips.png'); % i just grabbed a picture that had some greens imshow(A) minvalue =...

4 days ago | 0

Mean filter with kernel size

This is a routine uni project. There are a lot of existing examples on the forum. Assuming the filter kernel is rectangular ...

4 days ago | 0

Highest value number in a repeating array of ascending numbers

If those simple rules can be depended upon, then A = [1;2;3;1;2;3;4;5;1;2;3;4;5;6;1;2]; seqpeaks = A(circshift(A==1,-1))

4 days ago | 2

| accepted

To save an image using imwrite

You'll need to decide whether you want to scale the data. Toward that end, you'll probably need to decide whether these images ...

4 days ago | 1

"Index in position 2 is invalid. Array indices must be positive integers or logical values" when performing a for loop

MATLAB uses 1-based indexing, so UI(j,0) isn't a valid index. You can just use 1 for the first column. The loop isn't really...

4 days ago | 0

Plot from a result obtained in local functions

Just get the vector returned by each of the local functions when you call them. Then you can plot them. Pmax_1 = max_press1(W1...

4 days ago | 0

| accepted

Plot has wrong x-values

The values are not wrong. There are just few values, so the lines connecting the points make the appearance of nonzero data whe...

4 days ago | 0

Cell Array Reshape Operation

There are probably other ways, but... % a patterned test array A = repmat({(1:16).', (17:32).'; (33:48).', (49:64).'},5,5) ...

5 days ago | 1

| accepted

corners of rectangle by center point

You mean basic addition and subtraction? c = [-9.9366 1.6890 1.3800]; w = [0 1.7 0.3]; v = c + w/2.*[0 -1 -1; 0 1 -1; 0 1 1...

5 days ago | 0

| accepted

Why does this algorithm yield an 'incorrect' result?

This is a consequence of accumulating the small errors inherent to floating-point representations of numbers. A = 0.2; S = 0; ...

5 days ago | 1

| accepted

Elementwise indexing of a vector by a multidimentional array

I have no idea what's ideal for gpuArray, but this is how it would be done with linear indexing. T = 11:20; % a vector A = ran...

5 days ago | 0

How do I change the color distribution in contourf?

This probably isn't exactly what you want, but I think that an inpainting+marker approach would be visually misleading. In this...

5 days ago | 0

Height of a figure spontaneously changes.

It's seems like the figure properties aren't updated immediately. You're reading the properties before they're ready and then t...

6 days ago | 1

| accepted

bin2gary: Conversion to char from logical is not possible

The output of dec2bin() is a character array. If you want to do logical operations on it, you have to convert it first. x = ...

7 days ago | 1

I have 2d images in JPEG format created by matlab program and I want to convert them into .STL files using matlab code

Well, here's a half-baked answer, but anyone is free to do better. I just grabbed this mesh tool from the FEX and gutted it to ...

7 days ago | 1

| accepted

find out char in cell array

If all you're trying to do is get a logical indicator of which char arrays in a cell array start with a particular character, yo...

8 days ago | 0

how can i use my function directly on a array without having x and y?

You don't need to specify x and y when calling imagesc(). If you handle the input arguments like this: A = imread('cameraman...

9 days ago | 1

| accepted

Match real X, Y, Z, positions with calculated positions

This is a generalized example of finding and evaluating distances. I'm assuming here that simple euclidean distance is an appro...

10 days ago | 0

| accepted

How do i change color in a 3d animated plot over time?

Use hold and only draw one segment at a time. Note that for N points, there are N-1 segments, hence the length of the color tab...

10 days ago | 0

| accepted

1-bit TIFF images having more than 1 channel are not supported.

This is happening because img is of class 'logical'. You expand img to MxNx3 (img3). When writing the TIFF, if the BitsPerSamp...

11 days ago | 0

| accepted

Animated GIF contains offset in consecutive timestamps

To be more precise, the file does not contain any frame offsets. All the frames are positioned at [1 1]. The problem is that t...

11 days ago | 0