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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

Answered
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), ...

5 years ago | 0

Answered
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; ...

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

| accepted

Answered
"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...

5 years ago | 1

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 1

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

5 years ago | 0

| accepted

Answered
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'})

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

Load more