Community Profile

photo

DGM


Last seen: 1 day ago 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
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 = ...

24 hours ago | 1

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

1 day ago | 0

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

2 days ago | 0

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

3 days ago | 1

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

4 days ago | 0

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

4 days ago | 0

| accepted

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

4 days ago | 0

| accepted

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

4 days ago | 0

Answered
How write binary image pixel values to a text file such that each row contains only one pixel value of 8bit?
I'm no wizard with fprintf(), but this is one way to deal with it. I_in=imread('peppers.png'); B = cellstr(dec2bin(I_in,8));...

5 days ago | 0

| accepted

Answered
average image intensity problem
You're converting the images to floating point using double(). Use im2double(). Tools like imshow() or imwrite() expect data...

6 days ago | 0

| accepted

Answered
How can I show the scale of my arrow in a quiver plot?
Oof. This is one of the many reasons I don't like dealing with quiver plots. There are a few tools on the File Exchange that m...

6 days ago | 0

| accepted

Answered
how to add grid to imagesc?
It depends how you want to visualize the data. Tools like imshow() or imagesc() represent the data points at the center of each...

6 days ago | 0

| accepted

Answered
Adding a response text to a color detection code and another color to detect.
In order to be able to say that a color is (e.g.) "aquamarine" or "turquoise" or some particular name, you need to define explic...

6 days ago | 0

| accepted

Answered
what is horzcat error.
It means that one or both of Zs or Zm are nonscalar. This works with scalars Zs = 3; Zm = 1; Z= [(Zs-Zm) -(Zs-Zm) 0; ...

7 days ago | 0

| accepted

Answered
Function definition are not supported in this context. Functions can only be created as local or nested functions in code files
In versions which support local functions in scripts (R2021x does), the functions must be at the end of the file. There aren't ...

7 days ago | 0

| accepted

Answered
coins.png how to find the smallest coin in a image and display it alone in a separate window?
Something like this: A = imread('coins.png'); m = bwareaopen(A>80,100); % get areas, sort, get bounding box C = regionprop...

7 days ago | 0

| accepted

Answered
Show multiple axes all around image?
For a single axes, you can only have one set of tick labels per axis. The workaround is the creation of an empty axes to provid...

7 days ago | 0

| accepted

Answered
How do I plot a toroid in MATLAB?
MATLAB may not have a built-in function, but that doesn't mean there aren't any functions out there that can conveniently do the...

8 days ago | 0

Answered
how can I creat a circle in 2 dim and 3 dim?
You can always try this: https://www.mathworks.com/matlabcentral/fileexchange/58413-plot-superquadratic-surfaces These are con...

8 days ago | 0

Answered
How to change opacity of an image
There are many ways to approach it, but if logical masking suffices, simple indexing works: fg = imread('image.png'); % foregro...

9 days ago | 0

| accepted

Answered
How to find maximum amplitude of a vibration plot?
Something like % example data x = linspace(0,2*pi,100); y = sin(x); [maxy idx] = max(y); % find maximal y-value maxx = x(...

9 days ago | 0

| accepted

Answered
How can I remove the background fro the image and display roi for the shape of the image left ?
This probably isn't what you want, but it's probably a component of what you want. To do image processing operations with a si...

10 days ago | 0

Answered
How to compare two non-integer value together?
Your example arrays are identical, and I don't really know which one you're trying to compare to which. Consider the example us...

10 days ago | 0

Answered
How to solve error with Index exceeds the number of array elements (1). Error in line 35
You're trying to access pN2(n), pNH3(n), etc, for n>1. These parameters are scalars. for n=1:1:Numdata %Process Tf(...

11 days ago | 0

Answered
does two polygons interest or not?
You could test for an overlap using the intersection you calculated: x1 = [0 1 1 0 0]; y1 = [0 0 1 1 0]; x2 = [1 2 2 1 1]-0.2...

11 days ago | 1

Answered
Good Day, Can we convert .txt to .jpg or .png
Besides insertText(), which is a CVT tool, and direct figure capture, there are other text-image tools on the File Exchange: ...

11 days ago | 1

Answered
Saving a subplotted blocks in one image with 6 split parts
I'm going to assume your image isn't an indexed image. If it is, you'll have to carry the map around too. bmp = imread('pepper...

11 days ago | 1

| accepted

Answered
Convert Cell Arrays Containing Cell Arrays to separate columns
The comments in the code suggest how to do this. Using the attached test file with some header lines to skip: fid = fopen('tes...

11 days ago | 1

| accepted

Answered
how do i get x,y and z co-ordinates of the peak in a mesh?
You should be able to use max() on the z data. How you look up the corresponding x,y values depends on how your data is arrange...

11 days ago | 0

Answered
Remove dots from image
This is a simple way. Select all low-chroma regions and fill with white. A = imread('https://www.mathworks.com/matlabcentral/a...

11 days ago | 0

| accepted

Load more