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

of 246 638

REPUTATION**2 562**

CONTRIBUTIONS

**25** Questions

**965** Answers

ANSWER ACCEPTANCE **
60.0%
**

VOTES RECEIVED**276**

RANK**2 037** of 17 206

REPUTATION**799**

AVERAGE RATING**5.00**

CONTRIBUTIONS**8** Files

DOWNLOADS **100**

ALL TIME DOWNLOADS**5414**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

How can I use the solve command in Matlab to find the intersection of two equations?

Something like this: % solve system of equations syms x y eqn1 = x^2 + y^2 == 9; eqn2 = 2*x + 3*y == 4; S = solve([eqn2 e...

ungefär 8 timmar ago | 0

How to select several intervals from a vector?

Idk. Here's three ways. They all use loops. Is there something more elegant? Prrrrobably. Is it faster? Probably depends. ...

ungefär 10 timmar ago | 0

when making array of several sound signals, it doesn't give correct sounds when indexing each element

Something like this keys = '8675309'; toneduration = 0.4; spaceduration = 0.1; fs = 8000; sourcetones = [697 770 852 941...

ungefär 11 timmar ago | 0

| accepted

Remove the repetitive items in matrix

You're using solve to solve two independent equations as if they were a system, and solve is accordingly returning a set of poin...

ungefär 13 timmar ago | 0

| accepted

top- hat transform for signal processing

The tophat and bottomhat operations are the difference of the source image and the opening/closing of said image with the select...

ungefär 14 timmar ago | 0

Please let me know a way to use for loop to extract the first row elements from each column of data and check a condition and store these in a matrix

Something like this C = {'f' 'm' 'f' 'female' 'male'; '5.9' '6' '172' '' '180' }; g =...

ungefär 15 timmar ago | 0

I need some help with a mathlab project

Use a while loop. Switch-case is more concise. x = 0; while true fprintf('x is currently %d \n',x) uresp = input('...

ungefär 17 timmar ago | 0

sorting a cell array

Something like this: C = {3,1,6,[2,6,7],[4,10],10}; % don't call it 'cell' [~,idx] = sort(cellfun(@(x) x(1),C),'ascend'); C =...

ungefär 18 timmar ago | 0

| accepted

Setting the color of specific cells in a heatmap that contains two types of data

You can use NaN to indicate out-of-range data h = rand(10,10); h(h<0.1) = NaN; hh = heatmap(h); hh.MissingDataLabel = 'h <...

ungefär 18 timmar ago | 0

| accepted

whats wrong in this?

Use commas subplot(2,1,1) instead of subplot(2.1,1)

ungefär 19 timmar ago | 0

Error using 'cbfreeze' Matlab R2014b

Colorbar objects are fundamentally different than they were prior to R2014b. They used to essentially be axes objects. Those p...

ungefär 19 timmar ago | 0

Finding intensity of region inside a circle from image

Something like this: A = rgb2gray(imread('Bead_pic.png')); mask = A<100; mask = imfill(mask,'holes') & ~mask; % show the t...

ungefär 19 timmar ago | 1

| accepted

How I can read image with PPM format without imread and design PPM reader ?

Again, the documentation http://netpbm.sourceforge.net/doc/pgm.html As an example for this one image, consider the following...

ungefär 20 timmar ago | 2

| accepted

Why do I get giant values when I plug in very small decimal values in symbolic algebra?

When doing symbolic operations, it's going to always try to give exact representations of numbers. Ratios of integers are exact...

en dag ago | 1

| accepted

how to stack a 2D matrix form in 3D form?

Something like this A = randi(9,[6 3 6]); U = 3:5; % do it with a loop M = zeros(size(A,1),size(A,2),numel(U)); for k = 1...

2 dagar ago | 0

Plot surface of z=(x^2+y^2)^m for different values of m

Almost there r=linspace(0,1,21); theta=linspace(0,2*pi,63); [R,THETA]=meshgrid(r,theta); X=R.*cos(THETA); Y=R.*sin(THE...

2 dagar ago | 0

| accepted

How to plot histogram using matrix?

If I'm understanding the problem correctly, you're trying to plot a series of histograms, where column 1 is merely ordinal infor...

2 dagar ago | 0

| accepted

Order a matrix A 4x4 in another matrix B 6x6

Something like this: G = zeros(6); R1 = [0.1680 0.8400 -1.6800 0.8400 0.8400 5.6000 0.8400 2.8000 -...

3 dagar ago | 0

how to manually add a legend?

The suggestions I gave were in order of decreasing quality. Option #3 was intended to appear impractical enough that option #1 ...

3 dagar ago | 0

How to set background image for changing plot without using hold on/off?

I suppose this is one way. I'm sure there are others. imshow('peppers.png'); hold on % use hold for i = 1:5 % placeholder...

3 dagar ago | 1

| accepted

image segmentation but 'edge' does not work??

The image is actually a 3-channel (RGB) image. You can flatten it: lungct = imread('lungCT.png'); lungct = rgb2gray(lungct); ...

5 dagar ago | 1

| accepted

Cells and Matrix division

I'm still assuming you're using cell arrays, since that's the only way that the description makes sense. I'm sure someone c...

5 dagar ago | 0

error: eval: TRY must be a string

Why won't something like this work? f = @(x) 0.1*x - sin(2 * x) + 0.25; for i = 1:3 [a, b] = fgraf(f, -3, 3); z = ...

5 dagar ago | 0

Need help in the Color image fusion based on Pixel Average method

Let's start with this: rgbImage=imread('greens.jpg'); % Separate image into RGB [r g b] = imsplit(rgbImage); % Apply CLAHE...

5 dagar ago | 0

| accepted

Write code for a given plot

Something like this % points don't need to be any more dense than the marker spacing % so we really only need one set x = lin...

5 dagar ago | 0

| accepted

How to copy all cell array row to other cell row

Something like this A = [1 2;3 4;5 6; 7 8; 9 10; 11 12]; Acell = num2cell(A,2); % don't need the loop B = nchoosek(Acell,2)...

5 dagar ago | 1

| accepted

when i run my code i accept an Error: Not enough input arguments.

You need to actually call your function with input arguments. If no arguments are provided, an error will occur on the first li...

5 dagar ago | 0

adding random noise to an image for N times

Look at something like imnoise(). Decide what type of noise you need. Apply the noise in a loop. In all likelihood, the loop...

5 dagar ago | 0

For Loop Only Working with Specified Value Range "''index exceeds number of array elements""

Don't need the loop g= 9.81;%Gravity mc= 13;%Craft mass ml= 50;%Load mass m= mc+ml;%Total load ws= 10.9118;%Wingspan A= 16...

5 dagar ago | 0

| accepted

How can i create a long matrix?

Something like N = 20; A = [zeros(20,1) (0:1.5:(N-1)*1.5).']

6 dagar ago | 0