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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 1

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0