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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 1

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

| aceptada

Respondida
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)-...

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

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

casi 5 años hace | 0

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

casi 5 años hace | 1

| aceptada

Respondida
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 = ...

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 1

| aceptada

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

casi 5 años hace | 1

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

casi 5 años hace | 0

Respondida
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 =...

casi 5 años hace | 0

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

casi 5 años hace | 1

| aceptada

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

| aceptada

Respondida
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'); %...

casi 5 años hace | 0

Respondida
How can I plot circular colormap for 0-24 hour phase?
If you want a circular colormap, why are you using jet? Just use hsv(). imshow(repmat(permute(hsv(64),[1 3 2]),[1 64 1])) ...

casi 5 años hace | 0

| aceptada

Respondida
Extract coordinate data from plotm figure?
Something like this: F = openfig('sample_map.fig'); h = findobj(F,'type','surface'); x=get(h,'xdata'); y=get(h,'ydata'); z=...

casi 5 años hace | 0

| aceptada

Respondida
Populating matrix with coordinates of each element
For your example using row-wise linear indexing: s = [5 10]; % output size reshape(1:prod(s),s(2),s(1)).' Obviously, you'd ch...

casi 5 años hace | 0

| aceptada

Respondida
Plot function not working as expected - different graph to the one in cftool
You weren't far off amp_A=[0.02195; 0.02202;0.02208;0.02223;0.02237;0.0254;0.02305;0.02197;0.02198;0.0217;0.02205;0.02217]; om...

casi 5 años hace | 0

| aceptada

Respondida
trying to understand why I get 2.2204e-16 rather than 0
Simply put, the assumption that both x and y are equal to the same value is incorrect. One or both have accumulated rounding er...

casi 5 años hace | 1

Respondida
Any way to use images in several data arrays to create HDR images?
Start here: https://www.mathworks.com/help/images/ref/makehdr.html A web search for 'matlab hdr' should turn up many related i...

casi 5 años hace | 1

| aceptada

Respondida
im2uint16 makes images binary (to convert images from double to uint16)
The image returned by imadjust() is of class 'double', but it's scaled as if it were still uint16. Im2uint16() will assume the ...

casi 5 años hace | 0

| aceptada

Respondida
How is modeled the more short time this loop?
I bet this can be simplified further, but here. l = 4; R = rand(1,l); W = zeros(1,l); for k = 1:l W(k) = sum(R(1:l-k+1) ...

casi 5 años hace | 0

| aceptada

Respondida
How to combine two images in specific position for binary masking?
The images you're importing aren't the expected image height. If you divide by two, they won't tile correctly. If you do what ...

casi 5 años hace | 0

| aceptada

Respondida
Does imtool work on an image of type double?
How did you convert the image to double? If you did something like A = imread('mypicture.jpg'); A = double(A); then the imag...

casi 5 años hace | 0

Cargar más