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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

Beantwortet
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]...

mehr als 4 Jahre vor | 1

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 2

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 1

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 1

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

Beantwortet
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'))...

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

Mehr laden