Community Profile

photo

DGM


Last seen: Today Active since 2015

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

All
  • Most Accepted 2021
  • 6 Month Streak
  • Guiding Light
  • 5-Star Galaxy Level 4
  • Revival Level 3
  • Knowledgeable Level 4
  • Explorer
  • Thankful Level 2
  • First Answer
  • Personal Best Downloads Level 3
  • First Review
  • First Submission

View badges

Content Feed

View by

Answered
How can I turn the elements of a cell array into a bar graph?
Here's a start. This will space all the bars evenly, regardless of the date spacing: % create example array t = num2cell(date...

2 hours ago | 0

Answered
what does the "-1" means in conditional statement?
Entering the if structure isn't conditional on -1, it's conditional on whether SimGlobal.aSatData(i).sOrbitData.sEphData.PRN is ...

10 hours ago | 0

Answered
How to remove the number 0 between index1 & index2 ?
Assuming that you're only concerned with zeros between 1 or 2, and that all values are single-digit numbers, here's one way: A ...

11 hours ago | 0

Answered
How to plot different y values for different x values, provided the x and y values are to be generated in a loop?
This is a start: n=100; b=6.9; r=5; y=(r-1)+0.5; e=0;z=2; U=9000; npoints = 500; a = linspace(4500,U,500); q = 2*pi*a...

11 hours ago | 0

Answered
Is it possible to change the background color of data tips?
@Ankit is correct. There really aren't any such color properties for datatips. If you like frustration, you can always craft...

17 hours ago | 0

Answered
Please write a script for summation of 1/k
I don't see why the code you wrote wouldn't work. N = 100; s = 0; % using sum as a name shadows the function sum() for k ...

1 day ago | 0

| accepted

Answered
How to align of words in matlab legend ?
So long as a variable-width font is in use, you're going to be fighting it. y = rand(3,10); plot(y); % all three strings ha...

1 day ago | 1

Answered
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...

3 days ago | 0

| accepted

Answered
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...

3 days ago | 0

| accepted

Answered
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...

3 days ago | 1

| accepted

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

3 days ago | 0

| accepted

Answered
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...

3 days ago | 0

| accepted

Answered
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 ...

5 days ago | 1

Answered
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...

5 days ago | 0

Answered
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 ...

5 days ago | 0

Answered
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...

5 days ago | 0

Answered
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 =...

6 days ago | 0

Answered
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 ...

6 days ago | 0

Answered
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))

6 days ago | 2

| accepted

Answered
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 ...

6 days ago | 1

Answered
"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...

6 days ago | 0

Answered
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...

6 days ago | 0

| accepted

Answered
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...

6 days ago | 0

Answered
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) ...

7 days ago | 1

| accepted

Answered
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...

7 days ago | 0

| accepted

Answered
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; ...

7 days ago | 1

| accepted

Answered
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...

7 days ago | 0

Answered
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...

7 days ago | 0

Answered
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...

8 days ago | 1

| accepted

Answered
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 = ...

10 days ago | 1

Load more