Respondida
How do I leave the answer in real number form instead of natural exponents
That appears to be a symbolic vector. You should just be able to do double(gradientdescent) and get a plain numeric result

alrededor de 5 años hace | 1

| aceptada

Respondida
Reverse calculation for weighted average
Let's say we're trying to back calculate x= [a b c d e] that were used to generate the mean and sum. Is there a way to solve fo...

alrededor de 5 años hace | 1

| aceptada

Respondida
program that reads the color value in the CIE xyz color space and represents it on 3d space coordinates
Maybe this is of use. % generate two clusters of color points lab1 = randn(100,3).*[40 10 20] + [40 -40 40]; lab2 = randn(1...

alrededor de 5 años hace | 0

Respondida
not enough input arguments
The error is occurring because you're not providing the function odDetect with any arguments. A function will throw the error o...

alrededor de 5 años hace | 0

Respondida
How to run a for loop with two functions (nested for loop?)
Pretty sure that you're just intending to process alpha one element at a time, so just do that. Of course, you're overwriting a...

alrededor de 5 años hace | 0

| aceptada

Respondida
how can I plot the intersection of two cylinders?
Like everything, there are probably better ways, especially to get the edges closed. The simple way is to just plot the surface...

alrededor de 5 años hace | 0

| aceptada

Respondida
It can't read an image, it says the path does not exist even though the path does exist
Nobody here can guess the contents of the index file you're reading or the actual filenames on your disk. You can start by gene...

alrededor de 5 años hace | 0

Respondida
Subtraction of cell values with a fixed value
You could use cellfun() if you wanted. s = [1 39]; A = randi([1 20],s(1),s(2)); k = 100; % the number to subtract blocksiz...

alrededor de 5 años hace | 0

| aceptada

Respondida
For loop to create a new matrix taking a cluster of columns from existing matrix
Blockwise sum along dim 2 using a cell array s = [1300 36]; % set the array size FR_mat = randi([1 20],s(1),s(2)); C = mat2...

alrededor de 5 años hace | 1

| aceptada

Respondida
how to shift decimals ? !!
It all depends on the number format you specify: mynumber = 3.023155942378474e+42; title(sprintf('My Number is %.4e',mynumber)...

alrededor de 5 años hace | 0

| aceptada

Respondida
Creating rgb vector based on Z data for standard colorbar
This is an old method. I kind of wonder if there's anything newer that makes this simple... % make a custom colormap n = 256;...

alrededor de 5 años hace | 1

| aceptada

Respondida
fourier image of angled shape, and changes when cropping
Because the results of fft2() are scaled to match the geometry of the image it operates on, the shape of objects in the fft imag...

alrededor de 5 años hace | 0

Respondida
I am converting a 3D image to a set of 2D images(slices), but the images I receive are not of good quality, so there is a loss of information. Is there a solution? please help
Well here goes. I'm pretty sure the main problems were in the normalization, but there were other issues that could be simplifi...

alrededor de 5 años hace | 0

| aceptada

Respondida
segmentation of rice grains and sub plotting individual grains
You don't need the inner plot loop, and some other stuff can be simplified. I just removed the figure and imshow previews for b...

alrededor de 5 años hace | 0

| aceptada

Respondida
why the image processing usually use this eqution?
This example code implements a type of sliding filter. In this case, the filter size is defined by the filter kernel w (3x3). ...

alrededor de 5 años hace | 0

Respondida
Get mean and stdev from all values
If column 1 is sorted: % build test array idx = repelem(1:10,randi(6,10,1)); idx = idx(1:20); D = [idx.' rand(20,1)]; % the ...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to get the max orthogonal (perpendicular) distances from a set of coordinates
I'm sure this can be done much more efficiently, and I hope someone is motivated to prove that point. I'm cheating by using pol...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to convert specific GrayScale into coloured pixel
I forgot you were doing masking in RGB. You're right. The union of the masks won't span the image. You could find the set dif...

alrededor de 5 años hace | 1

| aceptada

Respondida
How can I combine if statement inside for loop?
I don't know what this is trying to do, so here goes. t = [-0.095; -3.953; -7.52; 7.59; 37.66]; m6 = 1.4544e+06; m5 = -5.7624...

alrededor de 5 años hace | 0

| aceptada

Respondida
How can I change the 1_D array to the 2_D in specific case?
It would probably be easier to build the array without starting from the vector, but I imagine it's a requirement. It could be ...

alrededor de 5 años hace | 1

| aceptada

Respondida
Create Matrix Please Help Me
This is one way n = 6; A = diag(1:n) [bx by] = meshgrid(n:-1:1); B = triu(by) + tril(bx,-1)

alrededor de 5 años hace | 0

Respondida
How do I put it in?
This isn't quite what you describe, since you're describing a series of 1x2 vectors, but: x1 = [-4.2 -2.6 -1 0.6 2.2 3.8 5.4 7 ...

alrededor de 5 años hace | 0

| aceptada

Respondida
trying to run this script and i keep getting error on line 5 and 15. It says " Error: File: Untitled3.m Line: 15 Column: 23 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched "
I'm not getting the same error in either version I tested (R2015b/R2019b), but there were other errors. I edited a couple of li...

alrededor de 5 años hace | 0

Respondida
What does the input image must be of class logical mean in Image region analyzer?
It means what it says. It requires that the images are binary images (all pixels are either black or white) and of class 'logic...

alrededor de 5 años hace | 0

Respondida
concatenate repeating digit to the end of a column in numeric matrix
Are you sure the data is being truncated, or is it rounded? Guessing the wrong answer means your alignment of additional digits...

alrededor de 5 años hace | 0

Respondida
contour map for stress distribution
I don't know what you're doing, but this at least runs: X = linspace(-4.5,4.5); R = linspace(-4.5,4.5); [X,Y] = meshgrid(X,R)...

alrededor de 5 años hace | 0

Respondida
How can I color the area under a histfit curve?
I have no familiarity with violin plots or your data, and I don't know which violin plot tools you chose to use. If you're tryi...

alrededor de 5 años hace | 0

Respondida
how to average the specific pixel value over a window
If the majority of pixels are white, the result is white, but otherwise average the nonwhite pixels. Such a filter can be made ...

alrededor de 5 años hace | 0

Respondida
sum of array by specific index value
This is one way. It's probably not the most efficient way, but it does the job. idx = [4 2 4]; H = [3.6881 0.8506 0.0132 0.85...

alrededor de 5 años hace | 0

| aceptada

Respondida
Problem with drawing a hyperboloid
You get a simple bicone because Z = R; and the colormapping looks random because C = (X.^2 + Y.^2 - Z.^2).^m; is essential...

alrededor de 5 años hace | 0

Cargar más