Respondida
Unable to perform assignment because the size of the left side is 128-by-128 and the size of the right side is 128-by-128-by-3. Error in ind2rgb (line 34) rout(:,:,1) = r;
Okay, after looking a few things up, it seems you're running some version prior to ~R2018x. Given that, the input dimensionalit...

alrededor de 5 años hace | 0

Respondida
Flipping a matrix diagonally
I'm assuming you want to flip the whole matrix diagonally To flip about the southeast-northwest diagonal is just transpose: A ...

alrededor de 5 años hace | 2

| aceptada

Respondida
Experts of MATLAB, how did you learn? Any advice for beginner/intermediate users?
Everyone else here has covered what are arguably the more useful answers. I'm no expert, but I think one point that hasn't been...

alrededor de 5 años hace | 3

Respondida
Extraction of object boundaries from an image
I don't know why everyone loves to hand out complete garbage test images for assignments like this. I lopped off the plot box a...

alrededor de 5 años hace | 2

| aceptada

Respondida
For loop with two conditions
Considering all the comparisons that are being made between unknown variables, I'm not eager to guess at what should be expected...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to automatically judge points belong to the corresponding sections in a 2D square
This is something in that direction. There are probably canonical ways of doing this, but I'm not familiar with that. Instead ...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to do Image Segmentation on multiple digit?
Don't rescale the characters in a way that changes their aspect ratio. Resize based only on one dimension, then make up for it ...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to count dots and mark those dots with crosses in an Image?
As far as I can tell, your sample image is corrupted. Either way, you can do this: % find centers of objects S = regionprops(...

alrededor de 5 años hace | 0

| aceptada

Respondida
Enclosing Boundary - for blobs
I'll throw this out there. I'm assuming that the goal here is density-dependent (linear) mask constriction. On that assumption...

alrededor de 5 años hace | 1

Respondida
How to deal with dimension of the both sides?
Start here X1_bar_i =[9.59547499999917 58282.181075 35.4837749999997 58288.903275 ...

alrededor de 5 años hace | 0

| aceptada

Respondida
Paint by numbers with Matlab. Imcontour function
This isn't really complete, but I'm not really sure that the best approach is found down that road. I'm using this as my test i...

alrededor de 5 años hace | 2

| aceptada

Respondida
Set limit for vertical or z dimension in surfl command
If you're refreshing the plot in a loop and want the extents of the z-axis fixed, just do zlim([lowerlimit upperlimit])

alrededor de 5 años hace | 0

Respondida
array counting in not happening
Your index i isn't valid because it's a complex number. i = sqrt(-1); This is a good example of why you shouldn't be using i o...

alrededor de 5 años hace | 0

Respondida
How to make a normalized matrix ?
If you just want to normalize the array such that its extrema correspond to [0 1], then for a given array A: mn = min(A(:)); m...

alrededor de 5 años hace | 0

Respondida
Find the average of all cells in a row.
Something like this: S = load('12X10Cell.mat'); A = S.AX_; % since all the cells just contain equal length vectors, just co...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to read a subplot as an image and find correlation for two images?
This is one way: % example images and points % points to plot [x y], one point per row inpict1 = imread('cameraman.tif'); in...

alrededor de 5 años hace | 0

| aceptada

Respondida
can't find bintprog solver matlab2016
bintprog() does not exist in R2016 It was essentially replaced with intlinprog() in R2014a Refer here https://www.mathworks....

alrededor de 5 años hace | 1

| aceptada

Respondida
How to assign a different colour for each layer?
Assuming you're using bar3() % make some example data maxlayers = 5; z = randi(maxlayers,10,10); h = bar3(z); % the plot ...

alrededor de 5 años hace | 0

| aceptada

Respondida
Axis ticks alternating between appearing on either side of the plot.
For what it's worth, nsmp = 20; % test data parameters nsig = 8; w = 0.9; % label spreading weight % make random test dat...

alrededor de 5 años hace | 1

Respondida
Clubbing of two matrices rows altenately
Try something like: A = [1 3 4 5 7; 4 5 6 6 7; 5 3 2 1 2; 2 2 2 3 4]; B = [1 1 1 2 3 ; 1 2 4 6 7; 3 5 6 7 8]; C = zeros(siz...

alrededor de 5 años hace | 1

| aceptada

Respondida
How can I reduce the for loop number?
No loops necessary. x_data = [2 6 7 9; 4 9 11 14]; y_data = [8 10 16 31; 15 18 21 24]; x = diff(x_data,1,1).^2 y = diff(y_da...

alrededor de 5 años hace | 1

Respondida
Calculate the sum of all the relations between a matrix components
This could be done various ways. You could do this with loops if it's easier to understand. I'll just do this: % example inpu...

alrededor de 5 años hace | 1

| aceptada

Respondida
Finding location with image processing method
Given that this was probably done by drone, I'm going to assume that framing and camera position are not practically repeatable....

alrededor de 5 años hace | 0

Respondida
How can I generate three random matrices from 20 percent of the rows of a 2000 by 80 matrix, using for loop?
I don't see why a loop is necessary. Is it? A = rand(2000,80); % test array s = size(A,1); nrows = round(s*0.2); X1 = A(r...

alrededor de 5 años hace | 0

| aceptada

Respondida
Create a row vector
one way: x = 1:2.25:10 another way x = linspace(1,10,5) of course, nothing says the vector had to be linear: x = logspace(...

alrededor de 5 años hace | 3

| aceptada

Respondida
Extract the center blob of an image
Well there's this inpict = imread('dots18.jpg')>128; L = bwlabel(inpict); S = regionprops(inpict,'centroid'); C = vertcat(...

alrededor de 5 años hace | 0

| aceptada

Respondida
Create a Loop for this process
Generally, using a bunch of numbered variables is something you should try to avoid. https://www.mathworks.com/matlabcentral/...

alrededor de 5 años hace | 0

Respondida
problem at smooting the spline
You could try doing something like this instead of trying to enforce endslopes x = [0.0 0.5 0.75 1.250 2.5 5.0 ...

alrededor de 5 años hace | 0

| aceptada

Respondida
How can I overlay two images with different colormaps in App Designer?
To replicate the behavior of the original post without relying on plot tools: % these are our test images with arbitrary data r...

alrededor de 5 años hace | 0

Respondida
How to save image with floating number name?
You mean something like this? mypict = rand(100); mn = mean(mypict(:)); filename = sprintf('the_mean_pixel_value_is_%.4e.pn...

alrededor de 5 años hace | 0

Cargar más