Community Profile # Chunru

Last seen: Today Active since 2013

Matlab user since 1990

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

draw a graph of peaks find peaks
[pks,locs,w,p]=findpeaks(X(1026,:),FsY,'MinPeakProminence',2); figure(1), clf % plot(Y,X(1026,:),'k-') plot(X(1026,:), Y, 'k-...

alrededor de 7 horas ago | 0

Varying vector from [0 100] to [100 0]
p1 = [0 100]; p2 = [100, 0]; dp = (p2-p1)/100; di = 10; % di=1 for i=0:di:100 p = p1 + i*dp; fprintf('%3d %3d\n...

alrededor de 10 horas ago | 0

Get Sensor positions manually in a uniform linear array (phased.ula) in phased array system toolbox
% Get the position of the array array = phased.ULA('NumElements',9,'ElementSpacing',0.05); p = getElementPosition(array) % Fo...

alrededor de 10 horas ago | 0

| accepted

Propability of x being less than y
In statistics toolbox, you can do the following: x = randn(20, 2) * 200; [h, pvalue, ci] = ttest2(x(:, 1), x(:, 2))

alrededor de 10 horas ago | 0

| accepted

Extract values from a data table and create a new table

alrededor de 16 horas ago | 0

spectrogram of a matrix with 32 channels in one graph with color
% generate some data fs = 128 x = sin(2*pi*(0:1023)'*(1:32)/fs) + randn(1024, 32); for i=1:size(x, 2) [s,f,t] = spec...

alrededor de 17 horas ago | 0

how to remove the zeros inside a 3D matrix?
% Xroot(z,w,k) (10x33x402). m1 = 10; m2 = 33; m3 = 402; m1 = 4; m2 = 5; m3 = 6; % Generate data Xroot = zeros(m1, m2, m3)...

alrededor de 17 horas ago | 1

How to remove "some" spikes from data
Try the following: filloutliers hampel medfilt1

1 día ago | 0

How to Merge the cells and name?
datayouhave = rand(8, 5); % replace this with your data t = array2table(datayouhave, "VariableNames", ["Maths", "Physics", "P...

1 día ago | 0

| accepted

How to find euclidean distances of each column of the two matrices?
A= [0.5958 0.8909 0.9135 0.5348 0.0558 0.4093 0.0265 0.1159 0.8576 0.0066 0.1568 0.8366 ...

1 día ago | 0

| accepted

DNN classify function uses GPU, or just CPU ?
Classify will automatically choose GPU (if it is available and suitable). You can also specify the use of GPU explicitly: clas...

1 día ago | 0

Issues using Summation in Matlab
This is symbolic computation. It's not clear what you want to calculate exactly. If you have value of d and n, you may want ...

1 día ago | 1

| accepted

Second set of y-axis labels for same data
yyaxis left plot(randn(10,1)) ylabel('Original Unit') xl_orig = xlim; yl_orig = ylim; yyaxis right %plot(xl_orig, nan(1,...

1 día ago | 0

| accepted

How to blur some part of image without affecting rest of the part?
I = imread("peppers.png"); imshow(I) LEN = 31; THETA = 11; PSF = fspecial('motion', LEN, THETA); % Blur part of image I(1...

2 días ago | 0

Is it possible to create a surface plot from scattered points?

2 días ago | 0

Neural Network Activation function
net = feedforwardnet([10 20]); % 2 hidden, 1 output layers % specify the transfer function as you want % Usually, layer1...

2 días ago | 0

| accepted

How to read images sequentially from a folder?
% create some files system('touch a.png'); system('touch c.txt'); pause(1) % make sure b is newer in datenum system('touch ...

2 días ago | 0

how to make horizontal bar graph in matlab?
a = readtable('data.txt'); % Read the data a n = height(a); barh(1:10, a.Var2(1:10)); hold on barh(11:n, a.Var2(11:n)); h...

2 días ago | 1

| accepted

How to make a unit energy signal?
%y=audioread('speech.wav'); y = rand(1000, 1); subplot(2,3,1); plot(y); xlabel('Samples'); ylabel('Magnitude'); title('Ori...

2 días ago | 0

| accepted

How to plot these two plots in a single figure and using both y axis?
Use yyaxis syms r psi_list = [1, 0.1, 0.01, 0.001]; % example: 0.1, 0.01, 0.001 figure yyaxis left hold on for i = 1:numel...

2 días ago | 0

| accepted

streamlining or sliming endless if-elseif of rem function, How?
N =3 % 3 varieties of foce calc, or/and initial forces m_tol = zeros(1,N) for bbm=1:N m_tol(1,bbm)=m_tol(1,bbm)+ 0.1*bbm ...

2 días ago | 0

| accepted

How to separate characters in a cell array by commas
Wondering why you want that. But it can be done as follows: e = [3 0 -6]; n = length(e); e_str = cell(1,2*n-1); for i = 1:n...

3 días ago | 0

| accepted

Vectorized nD diag loop
n = 400; m = 500; A = rand(4,n,m); B = zeros(4,4,n,m); % initialize to speed up tic for i = 1:n for j = 1:m ...

3 días ago | 0

| accepted

Random Band-Limited White Noise Excitation
% Band-limited noise can be generated by passing a white Gaussian noise % through a band pass filter fs = 5; ns = round(700*...

3 días ago | 0

| accepted

Computing the overlapping area of curves
scale = 1.5; x{1} = [0,4,6,10,15,20]*scale; y{1} = [18,17.5,13,12,8,10]; x{2} = [0,10.5,28]*scale; y{2}= [18.2,10.6,10.3];...

3 días ago | 0

| accepted

Change color of bar graphs?
y = [0.1064 0.1069 0.1084 0.1113 0 0.1130 0.1165 0.1189 0.1217]; b = barh(y); b.FaceColor = 'flat'; b.CData(1:4, :) = repmat(...

3 días ago | 2

| accepted

Perfect Square in Matlab
x = (1:20); mod(sqrt(x), 1) == 0

4 días ago | 0

How to calculate Fourier transform for exponential function without using FFT.
syms x f(x) = exp(-x.^2) y = fourier(f)

4 días ago | 0