Answered
Extracting a subset from the Faces and Vertices
[m,n]=size(FacesSub); [Indices,~,FacesSub]=unique(FacesSub); FacesSub=reshape(FacesSub,m,n); VerticesSub = Vertices(Ind...

5 years ago | 0

| accepted

Answered
Gamultibojective Problem "Not enough input arguments." Error
x = gamultiobj(@my_objfunction,2);

5 years ago | 0

| accepted

Answered
Why does my for loop cause MATLAB to not stop running?
In the code as you've posted it, the for-loop is never closed by an "end". That would prevent it from continuing to the next ite...

5 years ago | 1

| accepted

Answered
Plot an ellipse using an equation
fimplicit(@(x,y) 4*x.^2 +25*y.^2 - 32*x - 100*y+64)

5 years ago | 0

| accepted

Answered
implicit expansion for arrayfun
A=rand(10,5); B=3; C=rand(10,1); D=rand(1,5); args={A,B,C,D}; sz=cellfun(@size,args,'uni',0); maxsz=max(vertcat(sz{:})); ...

5 years ago | 0

Answered
Delete m consecutive rows every n rows
m = 6; n = 24; N = 87; data = (1:N).'+(0:10:20); % some data discard=repelem( [false;true] , [n;m], ceil(N/(m+n)) ); ...

5 years ago | 1

Answered
Run interpolation for several datasets at once
x and y used to be both vectors with constant spacing (x and y have their own spacing constant). which have been meshed. Let's...

5 years ago | 0

| accepted

Answered
Run interpolation for several datasets at once
If it's gridded interpolation, you shouldn't be using griddata. You should be using interp2. for i=1:N x_Wake = x(:,:,i)...

5 years ago | 0

Answered
Write the MATLAB program using fzero
Documentation and examples for fzero: https://www.mathworks.com/help/matlab/ref/fzero.html

5 years ago | 0

Answered
How do I efficiently add values of same indices to a vector?
vec1=vec1+accumarray(ind(:),vec2(:),size(vec1));

5 years ago | 1

| accepted

Answered
Cropping 3D image into equal size
If the idea is to split A into cell array cells, using imcrop3 is a little over-elaborate. Consider using mat2cell or download m...

5 years ago | 0

| accepted

Answered
Help with linear optimisation problem
Diffs=abs(reshape(B,1,1,[])-A); d=min(Diffs,[],3); [Arows,Acols]=find(d==min(d(:)));

5 years ago | 0

| accepted

Question


How does one set the PatientPosition and other spatial attributes when writing a dicom CT volume?
I am trying to write DICOMs of a CT volume in both single- and multi-file form. To check that the result is readable, I try read...

5 years ago | 0 answers | 1

0

answers

Answered
How to automatically obtain shape coordinates
Perhaps as follows load Image B=medfilt2(A,[5,5])<60; B=bwareafilt(B,5) & ~bwareafilt(B,1); T=regionprops('table',B,'Cen...

5 years ago | 0

Answered
Create a vector from repetition of two others
repmat([A,B],1,n)

5 years ago | 0

| accepted

Answered
Why is my array sending data back in E notation?
That's just the way Matlab displays things by default in the command window . There are other styles which you can set using the...

5 years ago | 1

| accepted

Answered
Define function with nonlinear equation system vercat error
F = @(x)[sqrt( (101 - x(1)).^2 + (16 - x(2)).^2 + (207 - x(3)).^2 )+ x(4)- 310.5685; sqrt( (52 - x(1)).^2 + (21 - x(2))....

5 years ago | 1

Answered
Solving a nonlinear equation using fsolve. cant reach at perfect result. output showing some error written below.
Result must be around 22-25. but itc coming .0029. As the plot shows, your function has no roots in the range 22-25 p = 1; ...

5 years ago | 0

| accepted

Answered
how could i turn this into a 5 by 5 filter
I2=medfilt2(I,[5,5]);

5 years ago | 0

Answered
Short Length Convolution Speed Up
From the documentation, it appears that the faster performance of fftfilt is indeed expected: When the input signal is relati...

5 years ago | 0

| accepted

Answered
Short Length Convolution Speed Up
Do you have the Parallel Computing Toolbox and a decently powerful GPU? If so, filter() is enabled for gpuArrays.

5 years ago | 0

Answered
Using mat2cell
You can use mat2tiles from, https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-...

5 years ago | 0

| accepted

Answered
Calculate log multiple columns
Your code is correct, assuming Germany_Greece is a matrix and not a table or some other data type.

5 years ago | 1

| accepted

Answered
How to plot these equations ?
Change P(m) to P{m} and Q(m) to Q{m} everwhere. Fs = 1000; % Sampling frequency T = 1/Fs; ...

5 years ago | 0

| accepted

Answered
how can i make 3d image from 2d slices ?
imshow is for displaying 2D images. For 3D images (grayscale), you could use volumeViewer.

5 years ago | 0

| accepted

Answered
Is it possible to reconstruct two 2D images (Front side and left side) to 3D image ?
For a general object, no it's not possible. For an object with some known structure, like a sphere, then yes: measure the radius...

5 years ago | 0

Answered
Elliposid number of faces
You would just access the Value property of the slider in its callback. Then use that value to replot the ellipsoid.

5 years ago | 0

Answered
The pooled covariance matrix of TRAINING must be positive definite.
I suggest you calculate the pooled covariance matrix and verify whether the error message is accurate.

5 years ago | 0

| accepted

Answered
eig return complex values
It turns out that B=C\A does have real eigenvalues in this particular case, but floating point errors approximations produce a s...

5 years ago | 0

Answered
replacing every 30 data points with the mean of them, in an 8 column matrix x 65000 data points. Reshape error
I should be ending up with an 8 x 2166 matrix I assume you mean 2166 x 8. plot_thresh_data=rand(65000,8); [M,N]=size(plot_th...

5 years ago | 0

Load more