回答済み
cell array to logical
In order to make a logical array of it, you'll have to specify the conditions where the output is true. Consider two examples: ...

11日 前 | 0

回答済み
Displaying objects found with bwconncomp
I never really use bwconncomp, but I guess you could do something like this. % create test image A = imread('coins.png') > 8...

11日 前 | 1

回答済み
Image matrix cell color
Let's say you just want to change one pixel A = imread('peppers.png'); newcolor = [230 50 185]; B = A; B(50,50,:) = newc...

11日 前 | 0

| 採用済み

回答済み
Sir i am getting error :function isgray has been removed. Please suggest me which version of matlab i should use.
As Steven notes, there are potential ambiguities with trying to do this. In my opnion, isgray() and isind() make some questiona...

11日 前 | 0

回答済み
Dark Mode editor for MATLAB
Similar to @Jacob Hartzer, I don't think scheming the editor is a sufficient solution. I described my own workaround in this th...

11日 前 | 0

回答済み
What indicate the values in colorbar?
In the first example, it doesn't mean anything. It's not referring to the image as displayed by imshow(), since imshow() is not...

11日 前 | 1

| 採用済み

回答済み
How to replace every value with the index of the value to the left of it
There's this: x = [ 2 3 4 5 6 ; 8 9 10 11 12 ] idx = reshape(1:numel(x),size(x)); out = [zeros(size(x,1),1) idx(:,1:end-1)] ...

12日 前 | 0

回答済み
image quadrant one by one and move to next quadrant
This should be a start s = [768 1024]; % generate three masks that can be transformed and combined % to create the desired ...

12日 前 | 0

| 採用済み

回答済み
How to draw all three plots on the same graph to get the exact graph given in the image?
I'm not sure if you're just after a working plot, or if you're trying to implement the spline interpolation itself. I'm going t...

12日 前 | 0

| 採用済み

回答済み
help with matrix concatenation
I'm just going to post these two examples as an answer. If you want to sample the process at the end of each pass, the struct...

12日 前 | 0

回答済み
How to replace cell and neighbors that are zero in a matrix with nan
If you have IPT, this becomes a simple segmentation problem: A = [0 0 0 1 0 0; 0 0 0 0 1 0; 0 0 0 2 0 0; 1 0 1 3...

12日 前 | 0

回答済み
I have a problem with dimensions of vektor and matrix, i do not know why my f vektor is 11x1, it should be 9x1 to be compatible with my matrix A which is 9x9.
The problem is in how you construct x. This looks to me like a classic fencepost error problem, but it's compounded by the fact...

12日 前 | 0

回答済み
how can I collect all possible combinations of two numbers from a data set in matlab ?
Something like this: A = [1 2 4 8 16 32]; k = 2; B = nchoosek(A,k) C = sum(B,2) Be aware how fast the size of B will incr...

12日 前 | 0

| 採用済み

回答済み
If loop matrix creation
"Want the matricies for vector that is created to be seperate." What exactly does that mean? I'm assuming "matrices" means "ve...

13日 前 | 0

回答済み
uigridlayout does not recognize 'fit' as parameter for rowheight
It looks like that was introduced in R2019b https://www.mathworks.com/help/matlab/release-notes.html?rntext=uigridlayout&startr...

13日 前 | 0

| 採用済み

回答済み
HOW TO CHANGE BINARY IMAGES TO 3D ARRAY (CONVERT TO 3D DIMENSION)
As per Rik's suggestion: % ... % assuming that your dicom images and binary images have same page geometry numframes = 41; ...

13日 前 | 0

| 採用済み

回答済み
How can a plot similar to this one can be done? with squares and dotted lines on each horizontal and vertical direction?
If you know where the vertices are, it should be fairly simple. Consider the very simplified example. x = [0 10 10 0 0]; y = ...

15日 前 | 0

回答済み
Deleting NaN from a large array
Depends on what "extremely large" means. Let's start by assuming it's not too large for this to work. Furthermore, it depends ...

15日 前 | 0

| 採用済み

回答済み
Sine function along inclined z axis
Actually, I think I misinterpreted what you meant by "trough". Let's start over. % surface parameters s = [500 500]; % [col...

15日 前 | 1

| 採用済み

回答済み
How can I remove red rectangles from the image or convert the red rectangle color in the image to white?
You could try to bludgeon the image with a median filter, but that's not going to be too great: A = imread('https://www.mathwor...

16日 前 | 0

回答済み
Plot function behave differently when only using line versus only using markers when plotting data with NaN values
Reposted from comments: Without knowing what the data looks like, I imagine that not all values are NaN. Markers will be visib...

16日 前 | 0

| 採用済み

回答済み
how do I do Integration
For a constant function like that, you could just do it geometrically: f = 2; xrange = [0.1 0.5]; s = f*abs(diff(xrange)) ...

17日 前 | 0

| 採用済み

回答済み
Sine function along inclined z axis
Consider the 1-D example: rotangle = 45; x = linspace(0,6*pi,500); y = 2*sin(x); trl = tand(rotangle)*x; % simple metho...

17日 前 | 0

回答済み
Mathwork address is required. My apologies if its not Matlab question
This shows the address registered for tax purposes. I do not know if there are other office locations. I suppose that depends ...

17日 前 | 0

| 採用済み

回答済み
is an ellipse-shaped structuring element possible
It's possible, just not with strel(). % build test image testsz = [35 35] A = false(testsz); A(ceil(testsz(1)/2),ceil(test...

17日 前 | 0

| 採用済み

回答済み
Interpolation on a 2d grid for a single point
I suppose if you just want to restrict the process to just the four neighbor points, you could do something like this. I'm sure...

17日 前 | 0

回答済み
How can I arrange images of splat over a 2D grid/matrix to form a 2D microstructure image?
Here's a start. I imagine you may want to do other things (e.g. controlling spot size or randomizing it?). I'll leave those ch...

17日 前 | 0

回答済み
changing a 3x3 to 5x5 median filter
Start by simplifying: % 2. Median Filter %READ IMAGE inpict = imread('sadimg.bmp'); %imshow(inpict) %title('IMAGE WITH NOIS...

17日 前 | 1

| 採用済み

回答済み
Four different outputs keep ending up with the same "answer" when I don't believe they're supposed to.
Something like this: numsteps = 100; numtrials = 10; distances = zeros(numtrials,1); finalpos = zeros(numtrials,2); for j...

18日 前 | 0

| 採用済み

回答済み
Can't work out what I did wrong
There were some parentheses misplaced in the expression for f. That said, the error is still large, but I suppose that's intent...

18日 前 | 0

| 採用済み

もっと読み込む