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
  • 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
Converting RGB Image to Grayscale Intensity on arbitrary Colormap
Something like this might be a start: % you already found a colormap cmap = parula(64); % generate false-color test image ...

20 minutes ago | 0

Answered
Splitting a Colorbar into 12 parts according to months from data
If you're doing a line plot, it may make more sense to just use a legend. % the selected colormap cmap = jet(12); % dummy d...

42 minutes ago | 0

Answered
Display L*A*B space channels separately
Lemme try that again... RGB = imread('peppers.png'); [L A B] = imsplit(rgb2lab(RGB)); Lfill = 50*ones(size(L)); % pick some...

1 hour ago | 0

| accepted

Answered
Why I do not get the graphics as I want. It is not a code problem
You have to plot more than one data point. load DataRaval2.mat load TempRaval2.mat for k = 1:48:numel(TempRaval) ...

2 hours ago | 1

| accepted

Answered
I have to combine 90 txt files in one txt file
This is a start. In this simplified example, there are three files, each with three lines. You might have to tweak the delimit...

3 hours ago | 0

Answered
can someone please tell me how to colour the mark area A,B,C,D?
Something like this: x1=[0.8043 0]; y1=[0 0.0789]; x2=[0.8407 0]; y2=[0 0.0825]; x3=[0.8726 0]; y3=[0 0.0890]; x4=[0.1 0....

4 hours ago | 1

Answered
Heatmap log colour scale: caxis() doesn't map values correctly?
You're expecting that caxis expects log10(limits). It's actually expecting the natural log. % Create log values and generate h...

4 hours ago | 1

| accepted

Answered
How to display a 256x256 image from .mat file?
Almost had it. S = load('GrayScaleMRI.mat'); imshow(S.GrayScaleMRI) When using the functional syntax for load(), the output...

6 hours ago | 0

| accepted

Answered
How can I plot xticklabels from a 3-column matrix?
You can try something like Adam's answer here: https://www.mathworks.com/matlabcentral/answers/101922-how-do-i-create-a-multi-l...

19 hours ago | 1

Answered
Trying to increase marker size in scatter plot caused my plot and data to be replaced by a blank blue screen.
You're dealing with 2D data, so ideally you'd be using 3 dimensions to visualize it. That said, there are only 2 unique values ...

22 hours ago | 0

Answered
File Installation Key Freezes during install
The broken UI elements is a longstanding bug. https://www.mathworks.com/support/bugreports/1797911 https://www.mathworks.com...

23 hours ago | 0

Answered
Add random numbess to matrix
Define "add 1-5% of its actual value to it" Consider an array A. Does this mean % random factor is scalar B = A + (0.01+0.04...

1 day ago | 0

Answered
I don't know how to write the following problem: f(x)=2x^3-15.4x^2+2.7x+2.25 - Determine the area under f(x) on the interval [-1,8]. Use the zeros rounded to one decimal
This can all be done symbolically easily enough xrange = [-1 8]; syms x f = 2*x^3 - 15.4*x^2 + 2.7*x + 2.25; area = int(f,x,...

1 day ago | 1

Answered
HOW TO PUT ONE MATRIX UNDER ANOTHER AND MAKE IT A SINGLE MATRIX
A = [1 2 3;4 5 6;7 8 9] B = [1 2 2;2 2 2;1 1 1] % concatenate C = [A; B] % or C = cat(1,A,B)

1 day ago | 0

| accepted

Answered
I want column matrix in for loop
I'm not sure, but this might be close to what you want. n=10 xrange = 11:13; yrange = 11:13; for k = 1:(n-1) image1...

1 day ago | 1

Answered
for loop which changes color depending on the month
I don't have your data, so I just have to assume some placeholder data instead. It's probably better to use a legend for identi...

1 day ago | 0

Answered
croping of an image without imcrop
Don't save displayed images; save the image itself. imwrite(I2,'E:\UB\MATLAB\X\1.png'); Saving a displayed image is tantamou...

1 day ago | 1

| accepted

Answered
How to use mean2 and skip some rows?
What's wrong with just mymean = mean(yearly_data_matrix(5:end,11)); since you're extracting a vector, I don't see the need for...

1 day ago | 0

| accepted

Answered
While loop not working
Your if statements don't do anything when they test true. That should all be one if-elseif structure because the cases are all ...

2 days ago | 0

Answered
Single value in colors vector causes error in scatter plot
The code you give works fine in the newest version that I have (R2019b), but not in R2021b. I'm not exactly sure what changed, ...

2 days ago | 1

| accepted

Answered
Colormap always shades of blue
You're not specifying your colormap length. If you don't do that, colormap() will create a map equal to the length of the curre...

2 days ago | 0

| accepted

Answered
what does format short in a matlab code do??
It just changes the display format used when numbers are printed to console. format long pi format short pi There are othe...

2 days ago | 0

| accepted

Answered
trying to store figures in an array, in a loop, instead of printing each figure
Since you're just using the gray colormap, there really isn't much that needs to be done. You can use mat2gray() to normalize t...

3 days ago | 2

Answered
while loop not working
This isn't exactly an elegant solution, but if we're gathering a bunch of parameters using input(), I think we've already crosse...

3 days ago | 0

Answered
Select only determined rows in a matrix
Something like this. You'll have to adjust the starting index as needed: A = repmat((1:100).',[1 4]) % smaller example (100x4)...

3 days ago | 0

Answered
Is it possible to use the colormap "Purples" in MATLAB, which maps zeros to white?
The answer is yes, but that's not really helpful. The real question is how do you get the colormap from matplotlib into MATLAB?...

3 days ago | 0

Answered
How to plot a matrix in a checkerboard style
Something like this should be a start: Im = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 1 0 0 ...

3 days ago | 2

| accepted

Answered
what does this mean in matlab code????
The expression ((floor(mr/2)==ceil(mr/2)) | (floor(mc/2)==ceil(mc/2))) conceptually says ((number of rows is even) OR (number...

4 days ago | 0

| accepted

Answered
only masking part of image help
There's at least one thing going on here. This operation frame(755:933,206:388)<threshold will return a 179x183 logical image...

4 days ago | 1

| accepted

Answered
How to plot a different symbol and symbol line for each plot inside this loop?
I'm not sure why you're using a loop to create the same plots three times with different symbols. Are there other columns (of a...

4 days ago | 0

| accepted

Load more