Respondida
Contour plot on 3D in polar coordinates
I'm going to assume "distance" maps to the height of an annular surface. EDIT: I just realized you said 'contour' and not 'surf...

casi 5 años hace | 0

| aceptada

Respondida
How can I show 3D image of any size? Is there any method to show 3D image in MATLAB?
Unless it's an mxnx3 array (i.e. an RGB image), imshow() doesn't handle 3D arrays. You can view slices of an image by directly ...

casi 5 años hace | 0

Respondida
I am trying to generate different colours between two colours
Something like this % get average color tuples A = reshape(mean(mean(im2double(imread('Aqua_Sky.png')))),1,[]); B = reshape(m...

casi 5 años hace | 0

Respondida
Create output of rectangles with 200 different colours
Adam already covered the sensible solution. I'll post my own. MIMT randspots() generates an image containing random colored ...

casi 5 años hace | 0

Respondida
Add legends to specific data points
Something like this: % fake data x = 1:21; y = (1:21) + 0.2*randn(1,21); yfit = x; err = ones(1,21); hold on; h(1) = er...

casi 5 años hace | 0

| aceptada

Respondida
Appdesigner: I cant manually change value of an editfield just after opening my app
As far as I know, this is a known bug. i don't expect it to be fixed. All that I know of are impractical workarounds. As far ...

casi 5 años hace | 0

| aceptada

Respondida
Could you please explain the code
John is right. If you don't know what it does conceptually (and certainly the variable naming and lack of comments is no help), ...

casi 5 años hace | 0

Respondida
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-65
For now, I'm going to assume c and d are scalar. % assuming c,d are scalar N = 10; T = rand(N); c = 2; d = 3; mu0 = 1; ...

casi 5 años hace | 0

| aceptada

Respondida
Why can't pcolor show the entire matrix to plot?
The plot appears black because a pcolor() plot is basically like a surf() plot. The faces are all outlined by black edges. Whe...

casi 5 años hace | 0

| aceptada

Respondida
Manipulating overlap colors from imfuse
First approach: This basically replicates what you're already doing, but it's flexible. % two test images A = im2double(imre...

casi 5 años hace | 0

Respondida
How to clear some of the noises while finding black dots' locations
Are you trying to remove the specks from the sky area, or are you just trying to find the locations? If you're just trying to c...

casi 5 años hace | 0

Respondida
concentration color field showing
A = im2double(rgb2gray(imread('conc1.png'))); imagesc(A) set(gca,'ydir','reverse') colormap(jet) colorbar Of course, the co...

casi 5 años hace | 0

| aceptada

Respondida
"any" returns the wrong logical value from a 3D matrix
The input to any() is (implicitly) logical. MATLAB considers nonzero numeric values to be logical true. In this case, you're t...

casi 5 años hace | 1

Respondida
Crop image in diagonal direction
This isn't really a complete solution, but oh well. Just because regionprops does binarization doesn't mean that the result n...

casi 5 años hace | 0

| aceptada

Respondida
include a maximum and minimum value to 'randr()' function
I don't know what randr() is, but consider uniform random numbers between [5 5.2]; using rand: x = 5 + rand([1 10])*(5.2-5) o...

casi 5 años hace | 0

Respondida
Unrecognized function or variable 'readlines'?
It's not complaining about the txt file missing. It can't find readlines.m, because readlines() was introduced in R2020b. You ...

casi 5 años hace | 1

| aceptada

Respondida
why do I get "Index in position 1 exceeds array bounds' error message and how to fix it?
I can't test this, since I'm in linux, which forces xlsread() into a fallback mode that breaks readinscans(). That said, I th...

casi 5 años hace | 0

Respondida
How can i reformat matriks from one column to one row
Something like this? A = randi([10 99],3,4) % example array v = [A(1,1:end-1) A(:,end).'] Either way, this is going to give...

casi 5 años hace | 0

| aceptada

Respondida
Display 3D graph for a function
You probably weren't intending to use matrix operations there. x3 = 0; nc = 10; [x1,x2] = meshgrid((1.68*(-1:1/nc:1)),(1.6...

casi 5 años hace | 0

| aceptada

Respondida
I have created 100x100 random numbers for rows and columns in range of 0-255, then I want to swap row one by one, similarly for column
I'm going to assume that you mean to swap pairs and that the array size is even. This is equivalent to a 180 degree rotation of...

casi 5 años hace | 0

Respondida
Specify annotation position with respect to x- and y-axes values?
As a spin off @Jorg Woehl's suggestion, I'll offer my own. I think it's worth pointing out that these solutions tend to be vers...

casi 5 años hace | 1

Respondida
Reducing the distance among subplot figures?
This is a bit of a workaround, but I've been using it for a long time. It works in older versions and it doesn't require a bunc...

casi 5 años hace | 0

| aceptada

Respondida
Plot the functions x(t), vx(t) and ax(t) in same graph and check qualitatively the mathematical relationship between three functions
t = linspace(0,1,100); x = -t.^2; v = -2*t; a = -2*t.^0; h = plot(t,x,'b',t,v,'r',t,a,'m'); legend(h,{'x','v','a'})

casi 5 años hace | 0

Respondida
How to show a dialog box (inputdlg) in full screen?
As far as I know, you can't really. Those dialogs don't have simply accessible properties, and they block execution. There's...

casi 5 años hace | 0

Respondida
specifying the coordinates of the corners of astraight line segments
Something like this? pt0 = [0 0]; % initial position [x y] segl = 1; % segment length N = 10; % number of segments % these...

casi 5 años hace | 0

Respondida
If statements inside while loop
Like this, if necessary. % set up parameters and use them max_k = 12; min_input=0; max_input=20; nisbad = true; while ni...

casi 5 años hace | 0

| aceptada

Respondida
How can i simplify this
Like Star Strider mentioned, you can use all() or any() a(i)>0 && ~any(a(i-32:i-1)) but there are a couple things to mention. ...

casi 5 años hace | 0

Respondida
Is stft supported on Matlab R2018a?
As far as the webdocs say, stft() was introduced in R2019a. That said, there are stft tools on the File Exchange. One of them ...

casi 5 años hace | 0

| aceptada

Respondida
Image processing with sub images
I don't know if this is what you're after I = imread('cameraman.tif'); SZ = 25; stepsize = 3; M = floor((size(I,1)-SZ+1)/s...

casi 5 años hace | 0

| aceptada

Respondida
create all logic permutation array
If you don't have the communications toolbox: n = 3; % number of bits LUT = dec2bin((0:2^n-1).',3)=='1' Note the bit order....

casi 5 años hace | 0

Cargar más