# 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**59**

of 244.174

REPUTATION**2.180**

CONTRIBUTIONS

**23** Questions

**797** Answers

ANSWER ACCEPTANCE **
60.87%
**

VOTES RECEIVED**241**

RANK**2.049** of 17.069

REPUTATION**787**

AVERAGE RATING**5.00**

CONTRIBUTIONS**8** Files

DOWNLOADS **94**

ALL TIME DOWNLOADS**5302**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

please give me answer what is wrong

Use elementwise division. x = 0:0.1:103; y = ((28*log(x) - 2*x - 12*x.^2.*log(x) - 4*x.^3.*log(x) - 12*x.*log(x) - 2*x.^2 - (2...

etwa eine Stunde ago | 0

| accepted

How to turn text into numbers

Well I'm sure there are more robust ways, but if all the file ever has is those two lines in that specific order with that speci...

ein Tag ago | 0

| accepted

How to close open contours

The contours are open because that's what describes the data. To close the contours misrepresents the behavior of the data at t...

2 Tage ago | 0

| accepted

Problme with Text analysis

I'm terrible with regex, but this might get you somewhere. Replaces everything but lowercase alpha and underscores. A = {'9.ba...

2 Tage ago | 0

I am missing the test signal "WashingMachine-16-8-mono-200secs.mp3" from the denoise example.

That should be included with the audio toolbox after R2019a. The files should be in $MLROOT/toolbox/audio/samples/ where $MLRO...

3 Tage ago | 0

Segment Image and Save as New Picture

You can't have an image of "just the dog", in the sense that the image must be a rectangular array. The background must be some...

3 Tage ago | 0

what is a(n) MATlab code that can help me calculate the volume of a cylinde then increase that result by 20% to get a result of 18m.

h0 = 15; dV = 0.2; hf = h0*(1+dV); fprintf('Oh my god, it''s %.2f meters tall! Aieee!',hf)

3 Tage ago | 0

| accepted

How to normalize signal to have mean=0 and amplitude 0 to 1

If you have a dataset where the mean is zero and the amplitude is within the interval [0 1], then the entire dataset is zero-val...

3 Tage ago | 0

Remake this without a loop

What's wrong with just using the test you're already doing? In the case you've given, the vector is unnecessary. A(A >= 1.5) =...

5 Tage ago | 1

Adding a row vector into the diagonal of another vector with m, n dimensions using for loop.

Actually, using a loop was pretty dang simple, now that I tried it. A = randi(9,5,10); b = 11:20; diagonalthing(A,b) dia...

5 Tage ago | 0

| accepted

How to get the centerline of a binary region

There's this. A = imread('arc.png')>128; B = bwmorph(A,'skel',inf); % skeletonize B = imfill(B,'holes'); % get rid of any...

5 Tage ago | 1

| accepted

how to remove [0,0,0] cell from an array

Consider: C = {rand(2,3) rand(3,3) rand(4,3) [0 0 0] rand(5,3)}.' iszerotuple = cell2mat(cellfun(@(x) isequal(x,[0 0 0]),C,'un...

5 Tage ago | 0

| accepted

grazing goat problem, how much of the area can the goat graze ?

Your answer is reasonable. As a point of verification: rf = 1; rg = 0.8; % intersection point locations % could also use ...

5 Tage ago | 0

How are the indices computed in gray2ind(...)?

Here's an example for a uint8 image: A = imread('cameraman.tif'); maplength = 32; [B bmap] = gray2ind(A,maplength); % as...

6 Tage ago | 0

| accepted

make a matrix out of list

It's not really clear if you want the contents of the file to be read into an array, or whether you just want a numeric (or othe...

6 Tage ago | 0

| accepted

Adding noise to image and removing it with average filter

The line mentioned in the error is certainly nonsensical, but afaik it shouldn't actually throw an error (at least in R2009b - R...

6 Tage ago | 1

Why isn't my matrix being filled?

When you define a function, you need to describe its input arguments and output arguments. This function definition has no in...

6 Tage ago | 0

Menu command list of colors converted to integers

I know this is part of the other question, but to clarify, the menu() command simply returns the index of the selected element w...

6 Tage ago | 0

Convert nested text cell array

I'm sure there's a simpler way, but idk. This will convert to a table. Note that the table columns are cell vectors. This i...

6 Tage ago | 0

| accepted

Loop iteration not working

Consider: x = 1:10 This expression by itself results in x being stored as a vector for y = 1:10 y end y In a loop sta...

7 Tage ago | 0

| accepted

No output from a for and elseif loop

That should be readlines(). P is a cell array of numeric vectors, so address it accordingly. Any assignment to J overwrites th...

7 Tage ago | 0

| accepted

Turning an entire script into a function

Try something like this. function [playerwon] = Battleship3(boardsize,numofguess,numships) % playerwon = Battleship3({boards...

7 Tage ago | 0

Taking a string input and transferring it to a integer

Meh. numbands = 4; colornames = {'black','brown','red','orange','yellow','green','blue','violet','gray','white','gold','silv...

7 Tage ago | 1

| accepted

Cropping images around the center of an image with a particular size

I don't know how you're getting that huge size. EDIT: I know why. I'll mention that at the end. The code will return a 225x22...

8 Tage ago | 0

| accepted

Remove a "plane" from my 3d plot

You could try to clip off the excess points with NaN and be left with a gap in the surface at the joint, or you could just avoid...

8 Tage ago | 2

| accepted

Error in array bounds

% ... % this loop has been simplified to the point that it works % for sx = 0.01:5 % s = [sx, 0, 0; % 0, sx, 0...

9 Tage ago | 0

How can I add more colors to semilogy?

The colors which are automatically used when plotting things with no explicitly-defined colors are specified by the axes 'coloro...

9 Tage ago | 0

Sampling pixel intensities according to distance matrix...

Disregarding splitapply() for a moment, the issue of working with non-integers can be avoided by using the histogram tools to bi...

9 Tage ago | 0

I cant edit the textboxes in app designer. how do i fix this?

This might be related: https://www.mathworks.com/support/bugreports/1797911 https://www.mathworks.com/matlabcentral/answers/41...

10 Tage ago | 1

| accepted

How do I confront the value of a matrix?

I'm not really sure what this is supposed to mean. %(x+y+z):3=value16 What guarantees that the sum of x,y,z is less than 3? ...

10 Tage ago | 0

| accepted