Answered
generation of 2D array of circular ring
In this case, I'm going to do an antialiased image instead of a binary image. sz = [300 400]; % image size [y x] c = [150 20...

3 years ago | 0

| accepted

Answered
what is the most effective way of using laplacian filter
FWIW, you can change the shape parameter for the laplacian kernel. Default is 0.2. Why is that the default? I don't know. fk =...

3 years ago | 0

Answered
Attempt to grow array along ambiguous dimension.
My guess is that either binaryFrame has 3 channels, or handGesture only has 1 channel. Either way, the expanded mask is deeper ...

3 years ago | 0

Answered
What's on your personal MATLAB to-do list?
It's not exactly a grand project, but ... A set of tools for drawing 2D lines/shapes in a raster image (independent of IPT/CVT)...

3 years ago | 0

Answered
How to match colorbar and countourf plot manually?
Set your caxis()/clim() values. Set your colormap length according to the number of discrete levels you actually have. x = 1...

3 years ago | 0

| accepted

Answered
How to get luminance and chrominance value from image?
You want "luminance". Let's assume we have an sRGB image. Luma (Y') would be factors = permute([0.2126 0.7152 0.0722],[1 3 2...

3 years ago | 0

Answered
Unable to save the autoplot image in the for loop
clc clear close all pathprefix = 'C:\Users\MASHHADSERVICE\OneDrive\Desktop\armina\data\'; numfiles = 1; C = cell(numfi...

3 years ago | 0

Answered
Why doesn't matlab have more plot colors?
I don't really care for it either,, but I should emphasize that it's not like there's some singular standard convention for colo...

3 years ago | 0

Answered
Hi, can you help me fix my code? How can I convert this to a matrix using if/while/for statements?
Consider the example: % some data in a column vector MERfff = (21:31).'; % rearrange it [xx yy] = meshgrid(MERfff); MERfg...

3 years ago | 0

Answered
Exporting only the plot legend to a jpg file
I don't have exportgraphics(), so I'm not going to bother with that. Consider the example: % plot some fake data yy = rand(20...

3 years ago | 0

Answered
I am embedding pdf into an Image. But after extraction i am getting blank page pdf. How to extract the correct pdf file whatever i have inserted?
fileread() is really just a convenience wrapper for fread() meant for reading text files. Up until R2020-something, it didn't e...

3 years ago | 0

Answered
Error: Edge function: variable might be used before it is defined
I'm pretty sure the reason that's happening is because later on in the same scope, you're shadowing the function by creating a v...

3 years ago | 1

| accepted

Answered
How to count number of only those zeros which are lying between 2 one's in a very simplified way in the given matrix?
This uses image processing tools. This is probably more expensive, but it's another idea. a = [0, 0, 0, 0, 1, 1, 1, 1, 0, 0 ,0...

3 years ago | 0

Answered
Need help to overlay transparent red on gray scale images (or movie) using a binary mask
If you have IPT, you could use labeloverlay() % labeloverlay() supports multichannel images gray_image = imread('peppers.png')...

3 years ago | 0

| accepted

Answered
How, in the same figure tile, to prevent a second contour plot from changing the colormap of the first contour plot?
Contour plots are colored based on the current axes colormap and the mapping limits set by clim()/caxis(). An axes object only ...

3 years ago | 1

| accepted

Answered
Change opacity of basemap using mapping toolbox?
I bet there's some better way to do this, but I didn't see one. Take that with a grain of salt. I never really use mapping too...

3 years ago | 0

| accepted

Answered
mean of all these variables over latitude x longitude x time that is (5 x 5 x 2)
If your data is a bunch of individual numeric arrays: % some fake data x1 = rand(5,5,2,65); x2 = rand(5,5,2,65); x3 = rand(...

3 years ago | 0

Answered
how to accelate the 'for loop' command' It's not end processing !!
Again, you're trying to construct large (~1.7 GB) arrays by growing them (in the reconstruction part). That will take an imprac...

3 years ago | 0

| accepted

Answered
Page-wise Diagonalization?
This isn't much, but it's one idea. The meager speed advantage falls off for small inputs. diag() is pretty fast to begin with...

3 years ago | 2

| accepted

Answered
How to speed the code? It does not want to end processing!!!!
Here's my guess. % assuming b,omega,t are all row vectors % width of Phi is equal to length of b,omega time_dmd = b.*exp(omeg...

3 years ago | 1

Answered
I am getting wrong text file after extraction process.
Here. This writes bits in a specified bit plane, across all three channels in the order [channels, rows, columns] (i.e. as per ...

3 years ago | 0

| accepted

Answered
mean brightness values from scale of 0 to 100% of selected each 7 rectangle areas to compare mean brightness
% Load the image inpict = imread('yellowlily.jpg'); % don't shadow image() % inpict = im2gray(inpict); % better brightness met...

3 years ago | 0

| accepted

Answered
Automatic generation of multiple X vs. hh:mm:ss data from an image containing multiple plot
This probably doesn't matter anymore if you've already done what you need, but it's what I prefer: https://www.mathworks.com/ma...

3 years ago | 0

Answered
How can I use find to create multiple variables instead of one variable that is a long vector?
I'm not sure if this is what is being asked, but: % some fake periodic data t = linspace(0,4*pi,500); y = abs(sin(t.^1.1)); ...

3 years ago | 0

Answered
How can i generate an array of integers that is more dense around a certain value?
The example you gave doesn't seem to do what you describe. Is this more what you're looking for? M = 10000; ending_point = 0....

3 years ago | 0

| accepted

Answered
convert from hsi to rgb in matlab with out using hsi2rgb and convert from rgb to hsv in matlab with out using hsi2rgb
MATLAB/IPT do not have tools for HSI or HSL. There are multiple submissions on the File Exchange, some of which are only one-wa...

3 years ago | 0

Answered
Group values in a vector
I'm not sure if this is what you're asking for, but: V = [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5] V = ceil(V/2)

3 years ago | 0

| accepted

Answered
Calculating the area related to a specific color in colormap
You might want to double check this. openfig figure1.fig; hp = get(gca,'children'); % CData in this case is 121834x3 % tha...

3 years ago | 0

Answered
How to create a 3-D Cardioid shape in MatLab? (a cylinder with a cardioid base)
Here's one way. % 2-Dimensional Cardioid theta = linspace(0, 2*pi); r = 1-(0.7*sin(theta)); x = r.*cos(theta)*1.25; y = r...

3 years ago | 1

| accepted

Answered
Gradient color line in geoplot3.
See this answer: https://www.mathworks.com/matlabcentral/answers/1974839-is-it-possible-to-plot-a-curve-with-changing-colours-u...

3 years ago | 0

Load more