Answered
How to generate a multi-dimensional array from a vector ?
I'm sure there are more elegant ways, but here's this. I'm pretty sure it works. % inputs m = 3; x = [1 2 3 4 5 6 7 8 9]; ...

15 dagar ago | 0

Answered
MATLAB output is a bunch of numbers with operators not the exact number
To be pedantic, those expressions are the exact result. The decimal values are an approximation. That said, you should be ab...

15 dagar ago | 0

Answered
this is a part of my code, I am getting this message. "Unable to perform assignment because the indices on the left side are not compatible with the size of the right side."
I'm going to go out on a limb and say that there's no reason to believe that the RHS of this assignment is a scalar. index(i)...

15 dagar ago | 0

| accepted

Answered
How can i correct brightness of a monochrome image using arithmetic operations?
For basic brightness/contrast controls, see this demo. https://www.mathworks.com/matlabcentral/answers/496452-contrast-vs-brigh...

15 dagar ago | 0

Answered
How can I combine bit map images to get back the original grey scale image?
Using a bunch of numbered variables forces you into writing unnecessarily repetitive code. This can be simplified. One way wou...

15 dagar ago | 0

Answered
How to superimpose many images using loop?
Imfuse is a simple tool for visually comparing two images. It has no practical use for processing more than two images. It sho...

15 dagar ago | 0

Answered
How can I use sliceomatic for 3D plots without getting the below errors?
As far as I know, sliceomatic() has been broken for years. As the error says, 'new' is not a valid option for the 'nextplot' pr...

15 dagar ago | 0

Answered
Combining images to make a composite image
There are a number of ways to do this. As usual, I'm going to generalize a bit since I doubt OP is the one who will see this an...

16 dagar ago | 0

Answered
How to overlap more than two images into a one image with Matlab?
Imfuse() is a simple tool for visually comparing two images. It has no utility for similar tasks involving more than two images...

16 dagar ago | 0

Answered
if loop dosen't complete?
size() returns a variable-length vector. Don't compare against the size() of an array if you're trying to compare against a sca...

17 dagar ago | 1

| accepted

Answered
how to create random value matrix with size 3X5?
If the numbers are supposed to be integers: A = randi([1 10],3,5) otherwise, if the numbers can be any value in the specified ...

17 dagar ago | 0

Answered
Running out of memory using imfuse repeatedly
The reason you're running out of memory is simple. Whenever imfuse() concatenates two images using the 'montage' option, the re...

17 dagar ago | 1

| accepted

Answered
Surround color for display
When you mask off data using NaN, the plot is simply not drawn there, revealing whatever graphics objects might be beneath it. ...

18 dagar ago | 0

| accepted

Answered
using nested for loop to print all of factorial
Something like this should be a start: for n = 1:100 % set a nested for loop factorials = 1; % this needs to be reset insi...

19 dagar ago | 0

| accepted

Answered
How may one digitize a curve from an image
These two answers are relevant and contain links to other related answers. https://www.mathworks.com/matlabcentral/answers/16...

21 dagar ago | 0

| accepted

Answered
Problem bluewhitered function colormap
bluewhitered() doesn't work like normal colormap tools. It actually queries the current axes 'clim' property and the map is tru...

21 dagar ago | 0

| accepted

Answered
Function int2bit not found
int2bit() was introduced in R2021b. If you're using R2019b, it's not available.

21 dagar ago | 0

Answered
Unable to apply separate colormaps and display in subplots
You can fix that by explicitly specifying the axes in the call to colormap(). original = imread('cell.tif'); h1 = subplot(2,...

21 dagar ago | 0

| accepted

Answered
Extract a series of values every n row of a matrix
Consider the small example: % a small 100x3 test array A = repmat((1:100).',[1 3]) % parameters blocksize = 10; rowstokee...

21 dagar ago | 0

| accepted

Answered
i have been given to find out the psnr value of a hyperspectral image / data. its is of size 690*110*300. how can i proceed to do that?
Consider the example: A = rand(10,10,10); B = A + randn(10,10,10)*1E-6; % using IPT psnr() R0 = psnr(B,A) % using basic...

21 dagar ago | 0

Answered
making matrix with text file information
EDIT: updated to handle new file encoding and empty blocks I'm just going to throw this out there. I'm sure it's entirely over...

21 dagar ago | 0

| accepted

Answered
what is meaning of this matlab
How about this % read a spreadsheet with the incomplete filename "prova1" % it is unknown whether the file actually has no ext...

22 dagar ago | 0

| accepted

Answered
Xor(A, B), does A, B have to be the same dimension?
The arguments don't necessarily need to have the same size/shape, but they need to have compatible size/shape. Like many things...

23 dagar ago | 0

| accepted

Answered
scatter 2d plot with value in color
It's not really clear, but here's a guess % two unequal length vectors x = 1:5; y = 1:6; % assuming the vectors imply a un...

24 dagar ago | 0

| accepted

Answered
How to add axis in a figure where I'm drawing lines.
You can set xdata,ydata for imshow() as you do with image()/imagesc(), but by default imshow() will turn off axis visibility. Y...

24 dagar ago | 0

| accepted

Answered
Cumulative Summation down a matrix in loop keeping total per section
Following the what's implied by the example: somedata = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_fi...

24 dagar ago | 0

Answered
Strange purple areas after color transfer with Lab color space
I'm not really familiar with LMS, and I don't know what tools you're using to do the LMS conversions, so I can't really test any...

25 dagar ago | 0

Answered
How can I find all possible pairs within a range that result in the same average?
I know Steven hinted at it, but I'm just going to give an example. Since the assignment forces you to accept bad decisions (and...

25 dagar ago | 1

Answered
Sum the pixel value of this rectangular ROI.
I can only assume that roi is an images.roi.rectangle object and not a logical array. If it is, you can convert it to a logical...

26 dagar ago | 0

| accepted

Answered
Overlay strain map on scan (colored plot over black and white plot)
Take the image you want to be grayscale and expand it to mxnx3 so that it isn't colormapped anymore: https://www.mathworks.com/...

27 dagar ago | 0

| accepted

Load more