Community Profile

photo

DGM


Last seen: Today 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

バッジを表示

Content Feed

表示方法

回答済み
Construct a 5 x 10 array that contains zeros. Assign elements at (row, column) (3,5), (2,4) and (1, 9) values of 44. Display the matrix.
Consider an altered example: In a 3x5 array, assign a fixed value to elements (3,3), (2,5), and (1,1) sz = [3 5]; % array size...

約19時間 前 | 0

回答済み
Techniques for blending images that have overlap
This is a simple approach to doing edge-interpolation. This could also be done using interpolation tools in fewer lines, but ri...

2日 前 | 0

| 採用済み

回答済み
No data points appear on the graph when I hit run
When you plot points one at a time, they are rendered as single unconnected points. Since there is no specified marker type, th...

3日 前 | 0

回答済み
Changing the limit of for loop give different result
Without knowing where fim comes from, I don't know. I'm going to guess that fim is another image imported the same way as the g...

4日 前 | 0

回答済み
Never ending while-loop
There are a few problems. LW(1) will never match variabel, since they're different lengths. The first 3 characters of LW will ...

6日 前 | 0

| 採用済み

回答済み
I am trying to use the "findpeaks" function to find the peak in a set of data.
The documentation for findpeaks explains it better than I could: "The prominence of a peak measures how much the peak stands ou...

6日 前 | 0

回答済み
why my matlab didn't plot anything?
Start with something like this: m = 85; g = 9.81; ti0 = 0; tf1 = 9; v0 = -20; h = 1; c1 = 11; dv1 = @(g,c1,v,m) g-c1*v/m...

6日 前 | 1

回答済み
New matrix with only the negative numbers of another one
A = [-1 ; -2 ; 6 ; -4 ; 5 ; 10; -22; 4]; B = A(A<0)

6日 前 | 0

| 採用済み

回答済み
How to update title of plot without it "wiggling"
The issue isn't with getting the right number of characters. It's an issue of character spacing. plot(rand(1,10),rand(1,10))...

6日 前 | 0

回答済み
Find equal pentagonal and square number
This is a rather brute force method, but it still only takes 1.5ms to find the third match on my dumpster PC. n = 1:10000; p...

7日 前 | 2

回答済み
Audio to Image Conversion
What are n and m? Is either greater than 65500? Should it be? I don't know if using factor() this way is really doing what y...

7日 前 | 0

| 採用済み

回答済み
Rescale 8-bit grayscale image
Here's a start: inpict = imread('cameraman.tif'); inrange = [64 126; 127 230]; outrange = [0 120; 151 255]; % you sure you ...

8日 前 | 1

回答済み
Create a surface from several 1D plots
Something like this: % so you have a vector for x x = linspace(0,1,10); % and a bunch of vectors for z z1 = x.^1; z2 = x.^2...

8日 前 | 0

| 採用済み

回答済み
Applying a circular mask to an image
There are other posts about how to composite two images (or an image and a flat BG) https://www.mathworks.com/matlabcentral/ans...

9日 前 | 0

| 採用済み

回答済み
Given a matrix of n rows and 2 columns containing the xOy coordinates of n points. Find two points with distance and return the row index of those two points
Consider: n = 10; % number of points d = 7; % distance to match P = 10*rand(n,2); % example point list D = sqrt((P(:,1)-...

9日 前 | 0

回答済み
Why didn't I find the same answer?
b and B are not the same. They are conjugate. B=-(-1)^(alpha-1)*(1/s^2)^(alpha); In this case (alpha-1) does not equal 0.7. ...

10日 前 | 0

| 採用済み

回答済み
Index in position 2 exceeds array bounds (must not exceed 1) ?
Nothing in this code guarantees that the size of b and c are identical to the size of a. If they aren't the same size, you will...

10日 前 | 0

回答済み
How to fix "error using class. Not enough input arguments"?
You had probably shadowed the function class() with some variable by the same name -- which is something you should avoid. wh...

11日 前 | 0

回答済み
How do I insert a variable value in legend of a plot?
There are a bunch of examples around. The sidebar shows some. Here are some others: https://www.mathworks.com/matlabcentral/a...

11日 前 | 0

回答済み
How to apply Gaussian filter with for loop without imnoise?
Replicating the gaussian noise functionality of imnoise() does not require any loops. If someone insists that you need to use l...

12日 前 | 0

| 採用済み

回答済み
how to do Image translation
blef. A = im2double(imread('cameraman.tif')); s = imsize(A,3); % nonstandard; see attached file B = zeros([s 4]); for f = ...

15日 前 | 0

回答済み
Plot multiple rectangles from set of points
Is this what you mean? C = [1 1; 2 4; 3 2]; % center locations [x y] for c = 1:size(C,1) r = 0.5+rand(1,2)*0.5; pl...

16日 前 | 0

| 採用済み

回答済み
How to remove contour line in filled contour plot?
Hmm. I didn't think about that. I don't know that it can be done with contourf(). % make a simple linear ramp that cycles [x...

17日 前 | 0

| 採用済み

回答済み
for loop/periodic implementation for number or arrays?
If I'm reading this right... Let's say you have an array A: A = randi([-5 110],5,3) % random test array allowedrange = [1 1...

17日 前 | 1

回答済み
Using bag of words function
If you just want the word frequency table: filename = 'SampleText.txt'; str = fileread(filename); words = regexp(lower(str),'...

17日 前 | 0

回答済み
Create Matrix using only zeros and ones
How about an example using concatenation only. No arithmetic composition or array indexing. e = ones(2); c = zeros(3,2); n =...

17日 前 | 0

回答済み
How to read and scan a text file
Attached is an example file: inputfile = fileread('SampleText.txt'); % make sure file exists? Number_of_vowels = vowelcounts...

17日 前 | 1

| 採用済み

回答済み
need help to plot function contain condition 'equal '
There are some problems here. Let's start with the solution. I adjusted the parameters so it looks more like the picture, but ...

17日 前 | 0

| 採用済み

回答済み
making a folded picture
If you want to edge-concatenate two images of the same height, you don't need to waste your time with imfuse. s = [s j]; If th...

17日 前 | 0

回答済み
How display different blocks of the images in one figure?
If you want them tiled as shown, then you're going to have to reassemble them into one image. A = imread('cameraman.tif'); %...

18日 前 | 0

もっと読み込む