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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

Beantwortet
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(...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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})) ...

fast 5 Jahre vor | 0

Beantwortet
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)

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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(...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
How to convert A= [13;8;12;4;8;1;13;0;10;13;1;6;14;13;1;14;11;9;9;10;10;15] to B= [3 0 0 1 0 1 0 2 2 3 1 1 4 2 1]
edges = 1:max(A)+1; B = histcounts(A,edges)

fast 5 Jahre vor | 0