Respondida
How do I plot a toroid in MATLAB?
MATLAB may not have a built-in function, but that doesn't mean there aren't any functions out there that can conveniently do the...

más de 4 años hace | 0

Respondida
how can I creat a circle in 2 dim and 3 dim?
You can always try this: https://www.mathworks.com/matlabcentral/fileexchange/58413-plot-superquadratic-surfaces These are con...

más de 4 años hace | 0

Respondida
How to change opacity of an image
There are many ways to approach it, but if logical masking suffices, simple indexing works: fg = imread('image.png'); % foregro...

más de 4 años hace | 0

| aceptada

Respondida
How to find maximum amplitude of a vibration plot?
Something like % example data x = linspace(0,2*pi,100); y = sin(x); [maxy idx] = max(y); % find maximal y-value maxx = x(...

más de 4 años hace | 0

| aceptada

Respondida
How can I remove the background fro the image and display roi for the shape of the image left ?
This probably isn't what you want, but it's probably a component of what you want. To do image processing operations with a si...

más de 4 años hace | 0

Respondida
How to compare two non-integer value together?
Your example arrays are identical, and I don't really know which one you're trying to compare to which. Consider the example us...

más de 4 años hace | 0

Respondida
How to solve error with Index exceeds the number of array elements (1). Error in line 35
You're trying to access pN2(n), pNH3(n), etc, for n>1. These parameters are scalars. for n=1:1:Numdata %Process Tf(...

más de 4 años hace | 0

Respondida
does two polygons interest or not?
You could test for an overlap using the intersection you calculated: x1 = [0 1 1 0 0]; y1 = [0 0 1 1 0]; x2 = [1 2 2 1 1]-0.2...

más de 4 años hace | 1

Respondida
Good Day, Can we convert .txt to .jpg or .png
Besides insertText(), which is a CVT tool, and direct figure capture, there are other text-image tools on the File Exchange: ...

más de 4 años hace | 1

Respondida
Saving a subplotted blocks in one image with 6 split parts
I'm going to assume your image isn't an indexed image. If it is, you'll have to carry the map around too. bmp = imread('pepper...

más de 4 años hace | 1

| aceptada

Respondida
Convert Cell Arrays Containing Cell Arrays to separate columns
The comments in the code suggest how to do this. Using the attached test file with some header lines to skip: fid = fopen('tes...

más de 4 años hace | 1

| aceptada

Respondida
how do i get x,y and z co-ordinates of the peak in a mesh?
You should be able to use max() on the z data. How you look up the corresponding x,y values depends on how your data is arrange...

más de 4 años hace | 0

Respondida
Remove dots from image
This is a simple way. Select all low-chroma regions and fill with white. A = imread('https://www.mathworks.com/matlabcentral/a...

más de 4 años hace | 0

| aceptada

Respondida
Why the colour bar values are not representing the vectors on the plot?
Quiver plots and line plots do not use the colormap used by colorbar. You have to explicitly set both the axes 'colororder' and...

más de 4 años hace | 0

| aceptada

Respondida
how to display an image in an array
Imagesc() doesn't convert arrays to images. Images are arrays. If you have something that needs to be normalized with respect ...

más de 4 años hace | 0

| aceptada

Respondida
Colour changes from figure to png upon export
I'm going to go out on a limb and guess that you're setting the axes color to something other than white. set(gca,'color','r'...

más de 4 años hace | 1

Respondida
Image / Matrix binning with sum of each bin
Avoiding any sort of weighting suggests to me that this is strictly integer-factor downsampling. If that's the case, then one w...

más de 4 años hace | 0

| aceptada

Respondida
How to create rainbow colormap with violet
If you have an image of a colormap from some other figure, you can fairly easily just extract the map without having to guess ab...

más de 4 años hace | 2

| aceptada

Respondida
How to assign value in an array depending on the index stated in another array
The first problem is this: zeros(size(24)) % this is a scalar because size(24) As a result, the output vector starts out und...

más de 4 años hace | 0

| aceptada

Respondida
how to create a for loop for 3 variables
This probably isn't exactly what you want, but I'm not sure what you're working with, and the approach can probably be improved....

más de 4 años hace | 0

Respondida
How to fix Arrays have incompatible sizes for this operation.
Without knowing what f is or anything, I'm going to assume that you're intending for this to be elementwise math. derivada = (f...

más de 4 años hace | 0

Respondida
Get every 4 values of a vector and change values
Maybe something like this a = [1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0] b = repelem(any(reshape(a,4,[]),1),4) I'm ass...

más de 4 años hace | 0

| aceptada

Respondida
How can I sort these number?
Try this a = [-4 4 -7 9 -2 -5 3 7]; b = sort(a,'descend'); [~,idx] = sort(abs(b),'descend'); b = b(idx)

más de 4 años hace | 0

| aceptada

Respondida
Code that is working in console, not working in the script?
The values passed to axis() are setting the x-limits such that the bars are no longer in-frame (and such that the bottoms of the...

más de 4 años hace | 1

| aceptada

Respondida
How can I make it so that the title is at the top rather than where it is?
If you're trying to get the tiles to show up in the uipanel, maybe this is a start: x = rand(1,20); mg = 0.05; p1 = uipanel...

más de 4 años hace | 0

| aceptada

Respondida
If i have a specific feature as an image how do i extract that from a larger image in matlab
If you're talking about a very forgiving case where the smaller image is known to be a subset of the larger image itself, then y...

más de 4 años hace | 0

Respondida
How to check the MATRIX is flip or not
It's unclear what you're actually asking for, but I'm going to guess it's one of the two: A = [1 2 3 4 3 2 1 2 3 4 5 4 3 2...

más de 4 años hace | 1

| aceptada

Respondida
Why is plot using range of values with increments not proper?
"In the above code, in the y axis output the values go above the normal sine range [-1,1] " No they don't. Look at the labels...

más de 4 años hace | 0

| aceptada

Respondida
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.760379e-19.
Your table has 4 columns, but you only have two labels in the vector called "Variables". Depending on your intent, you can add ...

más de 4 años hace | 0

Respondida
How to set Image contrast using slider?
Personally, I find simple two-parameter linear brightness/contrast adjustment to be frustratingly inflexible, but it's popular i...

más de 4 años hace | 0

Cargar más