Answered
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...

8 days ago | 0

Answered
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...

8 days ago | 0

Answered
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...

8 days ago | 0

Answered
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...

8 days ago | 0

Answered
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...

8 days ago | 0

| accepted

Answered
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...

9 days ago | 0

Answered
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...

9 days ago | 0

| accepted

Answered
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; ...

9 days ago | 0

| accepted

Answered
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 = ...

11 days ago | 0

Answered
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 ...

11 days ago | 0

| accepted

Answered
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...

11 days ago | 1

| accepted

Answered
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...

12 days ago | 0

Answered
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...

12 days ago | 0

| accepted

Answered
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)) ...

12 days ago | 0

| accepted

Answered
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...

12 days ago | 0

Answered
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 ...

12 days ago | 0

| accepted

Answered
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...

12 days ago | 0

| accepted

Answered
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...

13 days ago | 0

Answered
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...

13 days ago | 0

Answered
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...

13 days ago | 1

| accepted

Answered
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...

14 days ago | 0

| accepted

Answered
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...

14 days ago | 0

| accepted

Answered
Need help to seperate the text from the background
Thresholding might be part of it, but it'll take a lot of other work to make the masks into something useful. A = imread('https...

15 days ago | 1

| accepted

Answered
How do I calculate a logarithm of a variable base?
Nowhere in the synopsis for log() does it say that it accepts two arguments. For base 2, you can just use log2() More generall...

15 days ago | 0

Answered
How does imflatfield work?
William's comment is close. Probably close enough to be useful, but not quite exactly the same as what imflatfield() does. A =...

15 days ago | 0

Answered
How can I save a variable from the workspace to use it for another script?
You can save variables to a .mat file and then load the .mat file in the other script. https://www.mathworks.com/help/matlabmob...

15 days ago | 0

| accepted

Answered
How do I create a matrix with specific values?
Something like this: expbasket = randi([-9 9],6,21); % placeholder data rvalue = [-9; -6; -3; 3; 6; 9]; % don't need the whole...

16 days ago | 1

| accepted

Answered
how to copy arrays in a cell?
Just use repmat vel1 = repmat(vel1,[8 1]);

16 days ago | 2

| accepted

Answered
Cannot open file "Dataset\" for reading. You might not have read permission.
Something like this dirname = 'sources'; % or whatever directory you choose % get directory contents allfilenames = dir(dir...

16 days ago | 0

Answered
How to use randperm command with same starting and ending number each time to generate random numbers?
Here's one way. It can probably be simpler than this, but eh. N = 7; startnum = 3; endnum = 6; R = 1:N; R = R((R~=start...

16 days ago | 0

| accepted

Load more