Answered
copying file to a folder makes a new folder instead
Note that "myFolder" is the current folder storing the DCM files and the destination folders. If they are in two different path...

4 years ago | 0

| accepted

Answered
How to find the locations or indices of lower and upper ends of FWHM of a peak
Suppose y is the data, try this: You may change the interpolation method, mine is only an example. The location of the limits ...

4 years ago | 1

| accepted

Answered
How to plot this signal on matlab? Bounty
Not sure what is the exact function of the curve and simply assume it to be a cosine function. x=linspace(-1,1); y=cos(pi*x/2)...

4 years ago | 0

| accepted

Answered
How to read in a .txt and arrange the data into a scheme?
I try to use readcell as follows: rawdata=readcell('test1.txt'); header = rawdata(1,:); data = cell2mat(rawdata(2:end,:)); t...

4 years ago | 0

Answered
Finding the column of a matrix with the largest value
Try this, A = load('spikes.mat'); B = cell2mat(A.spikes); [~,I] = max(max(B))

4 years ago | 1

| accepted

Answered
Large number of Images to stack
Do not have 5000 images to try, just try because "cellfun" may be a bit slow. myFolder = 'C:\here i put the path folder contain...

4 years ago | 0

Answered
Why this simple for loop doesn't work?
For each i, the value on R1405_bar is keep overwrite as j runs from 3 to 30. On the other hand, you just calculate sum of squar...

4 years ago | 0

Answered
Mathematical formula calculation problem in Matlab
If you accept more than 1 line: Gamma = 1.4; M0 = 1.695; theta1 = 41.31; Msin = (M0*sind(theta1))^2; Gplus = Gamma + 1; Gm...

4 years ago | 0

Answered
How to find the exact value of the frequency by MATLAB?
May use threshold, which find another peaks on the left hand side plot(real(Fx)); hold on threshold = 1e4; pos = find(real(F...

4 years ago | 0

Answered
How to convert .mat file to .dcm format?
file = dicomread(fileName); imheader = dicominfo(fileName); dicomwrite(file,'RP.newname.dcm',imheader, 'CreateMode', 'copy');

4 years ago | 1

| accepted

Answered
find sum of the run length of non zero elements between zeros of a matrix
a=[ 1 2 3 0 0 0 4 5 6 0 0 0 7 8 0 0 9 0 0 ]; pos=diff(a)<0; % Position before hitting a zero ...

4 years ago | 0

Answered
How to reshape based on like values?
If I guess the logic correctly: A = [1 1 1 2 2 3 3 3 3 3 5]; N = histcounts(A); rowA = max(N); B= unique(A); colA = length(...

4 years ago | 0

Answered
Intersecting and non-intersecting box regions
If viusal inspection is allowed, then the number can be counted by plotting the boxes in a figure: rawdata=load('bbx.mat'); fi...

4 years ago | 1

Answered
How to prevent shaking video frames
Avoid using axis tight and axis equal together in this case. If possible, use axis tight or axis equal only in generating the f...

4 years ago | 0

| accepted

Answered
multiple conditions in matrix
Do you want this? d=C(C(:,2) == 1 & C(:,3) == 2)

4 years ago | 0

| accepted

Answered
Title spacing problems with cell array
for aa = 1:3 for bb = 1:3 title(sprintf('Condition: %s \n Pressure: %s %%',condition_array{aa}, pressure_array{bb})) ...

4 years ago | 0

Answered
how to create matrix with coordinates and calculate distance?
[Ny, Nx] = size(l); [X,Y]=meshgrid(1:Nx,1:Ny); D = sqrt(X.^2 + Y.^2)

4 years ago | 0

| accepted

Answered
plotting bar graph using matlab
Add xaxis limit: xlim([datetime(2007,1,1) datetime(2016,12,31)])

4 years ago | 0

Answered
How to convert a .txt file of 16 bit binary values into signed 16bit integers
A=readcell('Binary.txt'); B = strsplit(A{:},' '); C=reshape(B,2,[])'; D=cellfun(@(x,y) horzcat(x,y),C(:,1), C(:,2), 'UniformO...

4 years ago | 1

| accepted

Answered
Plot function and hold on feature not plotting one of my graphs
Seems Mean_CT1500 & Mean_CT2360 are the same, so they overlap to each other. Mean_CT1500 = mean(CT1500,2); Mean_CT2360 = mean(...

4 years ago | 1

| accepted