Respondida
How to fill the area between two curves with discrete data and with a condition (y<0 & y>0)?
If you just want an easy way, consider using this: https://www.mathworks.com/matlabcentral/fileexchange/61327-anomaly load('da...

más de 4 años hace | 0

| aceptada

Respondida
remove the zeros in the Matrix
If all you want is the intersection of all even rows and columns, just use indexing. z = randi([1 10],5,10) x = z(2:2:end,2:2:...

más de 4 años hace | 0

Respondida
Getting the mean from each cell row in a cell array
I'm sure there are more elegant ways than this, but eh. celery = {(1:5).' (2:2:8).' [3 6 9 1 5 6 8].'} n = cellfun(@numel,cele...

más de 4 años hace | 0

| aceptada

Respondida
Hide Picture inside Image
For example: % host image A = imread('cameraman.tif'); sa = size(A); % payload image B = imread('hands1-mask.png'); B = ...

más de 4 años hace | 0

Respondida
How to convert an image to a plain text & inverse ?
There are countless ways to convert an image to text. A literal interpretation would be something like: % convert to text file...

más de 4 años hace | 0

Respondida
Problem : Index exceeds matrix dimensions
Replace this line K=uint64(str2num(K)); with this K = uint64(hex2dec(K(:,3:4))); That should work in older versions, and t...

más de 4 años hace | 0

| aceptada

Respondida
Paste array a into array c based on the locations in array b
Assuming what you want is a vector, the example doesn't follow the description of the logic and the inputs given. Consider a =...

más de 4 años hace | 0

Respondida
How to add gray to out of range in the colormap?
You might try something like this: [x y z] = peaks(100); surf(x,y,z); shading flat camlight numcolors = 64; g = [1 1 1...

más de 4 años hace | 0

| aceptada

Respondida
Histogram equalization without histeq (color)
It all depends on why you can't use histeq(). If you can't use histeq() because you don't have IPT, then MIMT has a drop-in rep...

más de 4 años hace | 0

Respondida
Change to code formatting behaviour in editor in R2021b?
I don't have anything newer than R2019b, but the documentation suggests that the same should apply. The SmartIndentWhileTypin...

más de 4 años hace | 0

Respondida
Shade area under a plot with MATLAB
I don't know what shade() you're using, since it's not part of MATLAB. Otherwise, you can do something with patch objects: y =...

más de 4 años hace | 1

Respondida
Changing the Shape of straight line when plotting
Try something like this: lineLength = 1; lineAngle = 45; npoints = 10; offset = [0 0]; % [x y] c = linspace(offset(1),off...

más de 4 años hace | 1

| aceptada

Respondida
Image processing Gaussian noise
Something like this: % same as imnoise() defaults gaumean = 0; gauvar = 0.01; inpict = imread('cameraman.tif'); outpict =...

más de 4 años hace | 0

Respondida
How can convert a image from type of double(unit16) to a grayscale image?
The problem here isn't necessarily that the image isn't grayscale; it's that the data isn't scaled properly for other tools to k...

más de 4 años hace | 0

Respondida
Read three different RGB band and Swap the Band
More succinctly, you can just use indexing. A = imread('peppers.png'); % get an RGB image B = A(:,:,[2 3 1]); % pick a new cha...

más de 4 años hace | 0

Respondida
How to draw consecutive circles?
Here's an example. You'll need to adjust it for the number of cycles you want. I'm going to replicate the original image. s =...

más de 4 años hace | 1

| aceptada

Respondida
how to detect the four corners of a binary image including many white squares?
I'm using a modified copy of the image because you only posted a screenshot of a figure. I'm assuming that you're asking for th...

más de 4 años hace | 0

| aceptada

Respondida
I have a square matrix of ones and zeroes and I am trying to change all the ones to a user entered number. I am only successfully changing the first value in the matrix.
You can do this with logical indexing. For example: % test array A = randi([0 1],5,5) newvalue = 12; % value to substitute ...

más de 4 años hace | 1

Respondida
I want to make translation for this shape in binary image inside dictionary why when I try to move the center of the shape to point more than 1 this shape go out image frame?
Not knowing the details of what you're trying to really do, this essentially replicates the behavior, but using IPT tools. It's...

más de 4 años hace | 0

Respondida
converting a .tif image to a .tiff image
Both are TIFF files. That said, TIFF is a very flexible format and it's used for a wide array of things across many technical d...

más de 4 años hace | 0

Respondida
How do I save the original image jpg from figure for colormap?
A few things. Imwrite doesn't support indexed outputs for JPG files, so if you're trying to save the output as an indexed ima...

más de 4 años hace | 0

Respondida
How can I split an hsv image into separate h,s,v components?
Since R2018b, you can also use imsplit(). Imsplit will work on any multichannel image. % you can split an RGB image into its c...

más de 4 años hace | 0

Respondida
How to shift the matrix values by a specified function?
You mean something like this? % straight road xlim = 0:0.5:20; ylim = -10:0.125:10; [xr,yr] = meshgrid(xlim,ylim); ylim2 ...

más de 4 años hace | 1

| aceptada

Respondida
Getting the coefficients of a function in Matlab syms
Try syms a b f = expand((a+b)^2) c = coeffs(f) % if you want a symbolic result c = double(c) % if you want a numeric result

más de 4 años hace | 0

Respondida
Variation of color hue over time for multiple images
Here is an example. You'll need to adapt it. % get test images numframes = 6; instack = cell(numframes,1); for f = 1:numfra...

más de 4 años hace | 1

| aceptada

Respondida
Expanding a function in Matlab
Using symbolic tools: syms a b f = expand((a+b)^2) Your approach would ostensibly return a number because you're treating c...

más de 4 años hace | 0

| aceptada

Respondida
Plotting multivariable function given a range of x and y to be plotted at given values of dependent var Z
If you're having trouble getting results closer to the singularity, that's because the value of z at the corner is NaN. Z is ge...

más de 4 años hace | 0

| aceptada

Respondida
Calculate specified area for multiple circle
For the simple case where all circles are identical and the distance between centers is equal to the radius: R = 70.7; % in wha...

más de 4 años hace | 0

Respondida
labeling data sections on a graph
Consider the example: [x,~,z] = peaks(100); x = x(1,:); z = z(50,:); plot(x,z) labels = {'dip 1','bump 1','bump 2'}; t...

más de 4 años hace | 0

Respondida
Call to Extract Contents from Cell Array not Equal to Value in Cell Array
Oof. I didn't expect this. Can you find the tiny change I made here (other than line wrapping)? offY1 = {offsetY1:size(I1,1) ...

más de 4 años hace | 1

Cargar más