Answered
What is the RGB code of tytle stile color in matlab .mlx file?
I'm not sure if you're asking for a programmatic way of extracting the color or if you just want the color tuple itself. Assu...

5 years ago | 1

| accepted

Answered
Why is operation between column and row vector so slow
I'm assuming you're running R2016b or newer, otherwise that first test won't work. The vectors are the same length, but the two...

5 years ago | 0

| accepted

Answered
How to read in data from file using specific lines?
I'll leave the matter of how you choose to plot the data up to you, but this is one way to get the file read: % open file and g...

5 years ago | 0

| accepted

Answered
"Matrix dimensions must agree"
Without knowing the geometry of all the undefined variables, nobody can do much but guess. It's helpful to provide sample code ...

5 years ago | 0

Answered
Show constant in a Legend
You can use sprintf() to build the legend string from literal text and an assortment of variables. For example: % dummy parame...

5 years ago | 0

| accepted

Answered
Using a For Loop to combine a range of bins in a histogram
Well, as far as your function goes, you would need to be writing to an output vector at some point: function smoothed = Smooth(...

5 years ago | 0

| accepted

Answered
How to sum from a particular cell to last cell in a single row.
When indexing, you can use the 'end' keyword. % this is the row vector A=[1 5 7 1 3 4 5 12 2 4]; % pick a start index % ...

5 years ago | 0

| accepted

Answered
How can I plot 1x6 cell?
There are surely more succinct ways to do this, but I find that I'd rather have control over each individual plot series. First...

5 years ago | 0

Answered
Matrix points inside of a sphere
If the Euclidean distance from the point to the sphere center is less than the radius, then it's inside. Something like this: %...

5 years ago | 1

Answered
Plot of mass using different densities
Something like this %Mass of different size balls de= [.0015, .0020, .0050]; %Density [kg/cm^3] b=[100, 200, 300, 400, 500, 6...

5 years ago | 0

| accepted

Answered
Masking out Images different pixel intensity with different color values
Don't do it pixel by pixel. That'll take forever. At most, do it channel by channel or frame by frame. There are a lot of way...

5 years ago | 0

Answered
How to replace multiple rows of a matrix by rows of two other different matrix using a loop?
The MIMT toolbox here: https://www.mathworks.com/matlabcentral/fileexchange/53786-image-manipulation-toolbox contains two func...

5 years ago | 0

Answered
Extract datapoint corresponding to index from maximum of an array
The max() and min() functions can also return the index where the maximal/minimal value occurs. If I'm interpreting your code c...

5 years ago | 0

| accepted

Answered
Using a function to pass variables to another .m File (GUI)
This is the background material: https://www.mathworks.com/help/matlab/functions.html Say File1.m is something like you show...

5 years ago | 1

Answered
Reducing array size, discarding data
No need for loops. Assuming these are mxnxk arrays: childarray=parentarray(1:H, 1:W, :); Or if you don't want to start in the...

5 years ago | 1

| accepted

Answered
Converting 3D matrix to multiple images
I'm sure somebody has volumetric import/export tools to do this, but this is a basic approach: numpages=size(inpict,3); for p=...

5 years ago | 1

| accepted

Answered
Inserting zero intensity value in a patch of an digital image.
If you want something interactive that works with color images, the MIMT toolbox has a mask editing GUI that supports freehand, ...

5 years ago | 1

Answered
Plotting Square Consisting of '*'
Try this: clc a = input('enter a number:'); for ii = 1:a if any(ii==[1 a]) for jj = 1:a fprintf('* ') end el...

5 years ago | 0

| accepted

Answered
Extract first and last nonzero elemenents inside subarrays avoiding mat2cell
I arbitrarily chose to avoid loops and find() and ended up with this ugly thing. It works, but I wouldn't call it elegant. I a...

5 years ago | 0

Answered
How to split images in directory in half rgb and half grayscale?
One way would be to convert your script to a function and then use the batch processor app to interactively select the set of im...

5 years ago | 0

| accepted

Answered
how can i make b image laplacian ?
You can use fspecial() to generate either a 3x3 laplacian filter or a laplacian-of-gaussian filter. Both of these filters have ...

5 years ago | 0

Answered
Mean of every 5 columns of an image
Depending on what you need, there are probably lots of different ways to do this. I choose to assume that this is an exercise a...

5 years ago | 1

| accepted

Answered
No lines in my graph
To just address the plotting issue, bear in mind that what you're doing is plotting each point individually. It doesn't draw a ...

5 years ago | 0

Answered
How to remove open edge segments?
Technical image processing isn't my big thing, but I'll try. % reduce to a binary image % i'm assuming you have a better ima...

5 years ago | 0

Answered
How can I compare Images and choose the best based on which has the least white spots?
Technical image processing isn't exactly my background, but I'll take a shot at this. If we want to find the image with the few...

5 years ago | 0

Answered
Cannot use 'interp' for 'FaceColor' in patch
Your patch plot only has three colors, because your CData vector E_t only contains three unique values. Maybe that's the result...

5 years ago | 0

| accepted

Answered
Replace previous values with NaN
This can be done using isnan() and find(): A=[1 2 3 4 NaN 5 6 8 6 1 2 3 4 NaN 5 6 8 6]; nanidx=find(isnan(A),1,'last'); A(1:n...

5 years ago | 2

| accepted

Answered
Split color Image into 16 sub images and combine all of these images again to get color image
You start with what appears to be a RGB image and then you split it into 4 RGB images. If the input is color, the output should...

5 years ago | 0

Answered
Searching through a matrix to find a specific element
Let's start with a constant array so we know what to expect: A=[94 40 91 47 57; ... 47 5 59 64 75; ... 93 38 95 5 46;...

5 years ago | 1

Question


Is this the expected behavior of imapplymatrix() with explicit output class parameter?
I'm using imapplymatrix() to speed up some things and noticed that it was giving unexpected results when trying to use the outpu...

5 years ago | 1 answer | 0

1

answer

Load more