Respondida
Why the results are different when use different letters?
They are not the same. syms rs xs rp xp; [rp,xp] = solve( rs*rp^2+rs*xp^2 == xp^2*rp, xs*rp^2+xs*xp^2 == rp^2*xp) syms a b...

más de 4 años hace | 0

Respondida
How do I define the y axis of imagesc as integers and not fractions?
What Simon says is correct. If you only want the center ticks, you can specify them explicitly: A = rand(2,6); imagesc(A); y...

más de 4 años hace | 0

| aceptada

Respondida
Skewed Data when Scaling axis with imagesc()
When setting x and y inputs to imagesc() or image(), the entire x,y vectors are not used. Imagesc considers only the first and ...

más de 4 años hace | 0

| aceptada

Respondida
Concatenate strings and numbers
Strings and chars are different. Take care in how you combine them. MaxRows = 10; String1 = num2str(MaxRows) % a char vector ...

más de 4 años hace | 0

| aceptada

Respondida
How do I resolve this error?
Which error? I see a number of errors in the function definition and console. This looks like you took a function you found so...

más de 4 años hace | 0

Respondida
How to extract positive, negative and fraction numbers from string?
Since it was never clarified, I'm going to ignore sci/eng notation: str = '+100 -100 100 100.1 100.001 1.001 .001 100.'; B = s...

más de 4 años hace | 0

Respondida
I want to run this code?
I can't test anything, since there are missing functions, but: % there is no linespace() %[X,Y] = meshgrid(linespace(0,1,N),li...

más de 4 años hace | 0

Respondida
Why am I not able to plot this?
Three things: How are you calling the function? This file contains code prior to the function header, so it's not a function f...

más de 4 años hace | 0

Respondida
what value should i give for hsize and sigma in fspecial (gaussian) function???
Unless you have other needs, just pick a sigma value and then calculate hsize like so: sigma = 20; % this depends on your needs...

más de 4 años hace | 0

Respondida
How to flip non-zero elements of an array and keep zero elements at initial position?
I'm sure there's something simpler, but this is what my sleeplessness created: A = [1:5 0; 11:14 0 0; 21:23 0 0 0; 31 0 32 0 33...

más de 4 años hace | 0

Respondida
logical operation on matrix
I'm going to assume that the text question is what you're after: A = randi([100 999],10,10) % a bunch of integers mk = A>=500 ...

más de 4 años hace | 0

| aceptada

Respondida
problem with creating video from black and white images
What is class(image) and [min(image) max(image)] ? Because if the images are logical (or unit-scale floating point) the...

más de 4 años hace | 0

| aceptada

Respondida
RGB to YUV conversion
If all you want is Y, then just lumapict = rgb2gray(rgbpict); This calculates the luma (Y) based on the constants specified in...

más de 4 años hace | 0

Respondida
Image contrast when using labeloverlay
Try putting your images on a common scale. im = mat2gray(im); C = mat2gray(C); This will put both images in the range [0 1]...

más de 4 años hace | 1

| aceptada

Respondida
Returning an array of colors from a double image
Oh okay I totally misunderstood the question. Round 2: A = imread('patchchart.png'); patchmask = rgb2gray(A)>40; patchmask...

más de 4 años hace | 0

Respondida
how i can superpose (overlay) two images ?
You can use tools like imoverlay() or imfuse(), or you can combine the images by opacity blending. There are other ways "over...

más de 4 años hace | 2

Respondida
Connecting the dots in a binary image
It may be overkill for such a small image, but my answer to a previous question works well for largely convex closed paths like ...

más de 4 años hace | 0

| aceptada

Respondida
Graphic color that changes according to data
These are both similar examples: https://www.mathworks.com/matlabcentral/answers/1654235-how-to-change-color-of-graph-after-a-c...

más de 4 años hace | 0

Respondida
How to construct a N x N window that moves about an array (R) to calculate the number of a certain element in the window.
You'd just create a simple square array of ones. Consider the test array: R = zeros(9); R(1:2:end) = 1 % make a filter N = ...

más de 4 años hace | 1

Respondida
cutting a smaller potion of an image
Consider the following simplified matrix: A = [1 1 1 4 4 4 7 7 7;1 1 1 4 4 4 7 7 7;1 1 1 4 4 4 7 7 7; ... 2 2 2 5 5 5 8 8 ...

más de 4 años hace | 0

Respondida
Returning an array of colors from a double image
You can leverage rgb2ind()'s minimum variance quantization to get a best-fit color table of specified length. A = imread('https...

más de 4 años hace | 0

Respondida
when blur is a low frequency component, how does a motion blurred image spectrum possess high frequency?
This isn't going to be a technical explanation, but consider the following: I don't know where the source image came from, but ...

más de 4 años hace | 0

Respondida
is it possible to define only the sigma value in the edge command?
Bear in mind that even if you were able to specify the arguments out of order, edge() will assume a default threshold value. Th...

más de 4 años hace | 0

Respondida
How do I use a plus and minus in a variable
If we're simply working with numeric variables, something like this may work: B = 5 + [4 -4] Or in cases where the +/- term is...

más de 4 años hace | 1

Respondida
How to extract odd values and even values from a 500x500 black image ?
Consider the matrix: A = randi([10 99],5,5) % get elements from odd linear indices oddelems = A(1:2:numel(A)) % get elements...

más de 4 años hace | 0

Respondida
Create a specific matrix (MATLAB)
This is one way: A = flipud(toeplitz([4 3 2 1]))

más de 4 años hace | 0

Respondida
add space column to matrix
See if this is more along the lines of what you need A = [1 2 3;4 5 6] b = {'a' 'b' 'c' 'd'} Ac = split(sprintf('%G\n',A'))...

más de 4 años hace | 0

Respondida
How does the colon operator work in a 4d object?
Your goal isn't to affect the values of a particular dimension. There are no values "of a dimension" it's just the whole array....

más de 4 años hace | 0

Respondida
How to overlay a mask on an image with zero transperancy?
You can still use basic masking methods. Note that in this case, the images as supplied are both uint8. If your working images...

más de 4 años hace | 0

| aceptada

Respondida
How to draw a letter T ? the background is black and the letter itself white
FWIW, you can always just do A = ones(16,18); A([3:5 19 20 35 44 51:60 67:76 83 92 99 100 115:117 ... 150 166 180:187 195...

más de 4 años hace | 0

Cargar más