Community Profile

photo

Chunru


Last seen: Today Active since 2013

Matlab user since 1990

Statistics

All
  • Treasure Hunt Participant
  • MATLAB Central Treasure Hunt Finisher
  • 12 Month Streak
  • Guiding Light
  • Number Manipulation I Master
  • Indexing I Master
  • Revival Level 2
  • Knowledgeable Level 5
  • Commenter
  • Sequences And Series II Master
  • Speed Demon
  • Creator

View badges

Content Feed

View by

Answered
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

Answered
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

Answered
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

Answered
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

Answered
Extract values from a data table and create a new table
T = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1057240/Sta_Teresa.csv"); T1 = T(T.PRCP > 1, :)

alrededor de 16 horas ago | 0

Answered
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

Answered
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

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

1 día ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
Is it possible to create a surface plot from scattered points?
a= readmatrix("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1055560/Datas_xymises.txt") whos position_x = a(...

2 días ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

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

4 días ago | 0

Answered
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

Answered
Is there a way to handle the writing labels of axes coordinate (The writing is not in a straight line with respect to the axes. I would like to modify that.)?
[X, Y, Z] = peaks(40); figure surf(X, Y, Z) xlabel('This is XLabel'); ylabel('This is YLabel'); h =gca; % use the follow...

4 días ago | 0

Answered
The program cannot work
% [roll1,roll2] = dice(6) % The above is wrong in syntax as the function has only ONE return object % dice (as an array). %...

4 días ago | 1

Load more