Community Profile

photo

Chunru


Last seen: Today Active since 2013

Matlab user since 1990

Statistics

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

View badges

Content Feed

View by

Answered
Determine frequency of signals
load signal1 fs = 1; % normalized freq y = abs(fft(x)); L = length(y); f = (0:round(L/2)-1)/L*fs; p = y(1:round(L...

3 días ago | 0

Answered
How to integrate LFM signal into pulse
fl = 100; % Hz fu = 200; fs = 1000; pw = 0.1; % sec pri = 1; % sec % LFM t = (0:1/fs:pw)'; x = cos(2*pi*(fl*t + ...

3 días ago | 0

| accepted

Answered
Two x-axis (Arrhenius plots)
Not sure your equation. But you can modify the following to produce the plot: x = linspace(2.5, 4, 20); % x corrdinate ...

3 días ago | 0

| accepted

Answered
How do I find a specific x values in an array(?) of x,y locations?
% floating point inside computer may not be exact find(abs(locations - 143.4955) < 10*eps)

8 días ago | 0

Answered
Hi, I want to make the final output to 4 decimal places. But it kept showing only 1. I tried a lot but doesn't work. Please help me
Ass_1 = 60; Ass_2 = 75; Ass_3 = 80; totalass = (Ass_1 +Ass_2 + Ass_3)/3; %Quizzes quiz_1 = 76; quiz_2 = 90; quiz_3 = 54;...

8 días ago | 1

| accepted

Answered
store strings and numbers into an array
% You can use structure array PersonInfo(1) = struct("Name", "Peter", "Age", 28); PersonInfo(2) = struct("Name", "Fabian", "Ag...

9 días ago | 0

Answered
Vectorize nested for loop with matrix indexing
% The following code is slow, because the array size is growing. Memory % allocation will slow down the program % Z1_encryp...

9 días ago | 0

| accepted

Answered
plot complex eigenvalues over time
n = 20; x = (3+randn(n,8)) + 1i*(2+randn(n, 8)); % generate some data 20x8 instead of 1584 x 8 cmap = jet(n); % use differe...

11 días ago | 0

Answered
Convert Cell Arrays Containing Cell Arrays to separate columns
fn ='dbe-ew-transient analysis - 5% critical damped.f06'; linenum = 165164; M = readmatrix(fn, 'Range', 165164+":"+999);

11 días ago | 1

Answered
How can i Assign the value of cut-off frequency ?
f=[0.01:0.01:2e04]; s=2*pi*f; wc1=j*2*pi*10; % fc wc2=j*2*pi*500; H1=(s+wc1).^-1; H2=(s.^2+(wc1+wc2)*s+wc1*wc2).^-1; MH1...

15 días ago | 0

Answered
How to delete 'Userdata' in hObject of Matlab GUI?
How about this? handles.grafik.Userdata=[]; handles.noise.Userdata=[]; ...

16 días ago | 1

Answered
how to make the label inside this graph that arrow sin(pi/2) and how to make the grid like tht blurry and no cut line
t = linspace(-pi, pi, 41); x1 = sin(1*t); x2 = sin(2*t); plot(t, x1, 'bo-', t, x2, 'r*-'); grid on pos = get(gca, 'Position...

16 días ago | 0

Answered
How to change a Data Series contained with Repeated NaNs to become other sequence of NaNs?
A = [NaN, NaN, 0, 0, 0, NaN, NaN, 0, 0, 0, 0, 0, NaN, NaN, 0, NaN, NaN]; idx = isnan(A); % any repeated nan will be replaced w...

17 días ago | 1

Answered
from a python code to matlab code
hairstyles = ["bouffant", "pixie", "dreadlocks", "crew", "bowl", "bob", "mohawk", "flattop"]; prices = [30, 25, 40, 20, 20, 35,...

17 días ago | 0

Answered
How to plot multiple layers of heatmap as a function of a third variable in the z direction
[X,Y,Z] = meshgrid(-2:.2:2); V = X.*exp(-X.^2-Y.^2-Z.^2); zslice = [-1.2,0,1.2]; yslice = []; xslice = []; slice(X,Y,Z...

17 días ago | 0

Answered
from a python code to matlab code
% cuts_under_30 = [hairstyles[i] for i in range(len(hairstyles)) if new_prices[i] < 30] cuts_under_30 = hairstyles(new_prices <...

17 días ago | 0

Answered
Calculation of phase of signal
fs = 50; ns1 = 200; % samples for x1 f1 = 1; x1 = sin(2*pi*f1*(0:ns1-1)/fs); % first part % Try to make the fist...

18 días ago | 0

| accepted

Answered
area of 10m2 .overa 0.05 − −t 0.000018t^2
% The function name is "f" not "dtdT" [t,T]=ode45(@f,[0 3600],(40)); plot(t,T,'-') xlabel('Time (s)') ylabel('Temperature (o...

18 días ago | 1

Answered
augmentation of pretrained network reducing accuracy
Generally speaking, training with data augmentation will lead to poorer traing accuracy, since the model needs to fit more trai...

18 días ago | 0

| accepted

Answered
Custom levels in contourf
load variablesForQuestion v20=[-25 -20 -15 -10 -5 0 5 10 15 22.5 25]; subplot(131); % Your data CI has range from -17 t0 100 ...

18 días ago | 0

Answered
I can not see the correct x axos number
n_temp=linspace(14,18,1000); % x-axis [cm^-3] n=10.^(n_temp); plot(n_temp, n)

19 días ago | 0

Answered
Average of 3 one dimensional matrix loaded by .mat file
%The following will return the structure RF1=load("RF1.mat"); RF2=load("RF2.mat"); RF3=load("RF3.mat"); % You need to extrac...

19 días ago | 0

| accepted

Answered
"audioread" multiple audio files in a folder
clear all; audio_files = dir('C:\Users\KOH\Desktop\MATLABcode\Soundsample\SPTGRM*.wav') for i=1:numel(audio_files) % You ...

19 días ago | 0

Answered
How to know the smallest number after 0
P = randi([0 65535], [5 5 10], 'uint16'); % smaller size for demonstration P1 = P(:); min(P1(P1>0))

19 días ago | 0

Answered
What might be wrong with the code?
The data you plot is a straight line. The expected data should be something shown below. E1=-13.6; E2=-3.4; k=8.617*1...

20 días ago | 0

Answered
pie chart subdivision of a sector
x = [73.1 39.3 29.9 8.2 7.2 6.2]; xp = x/sum(x); x1 = [xp(1:2) sum(xp(3:end))]; x2 = xp(3:end); figure; hold on theta0 = 0;...

22 días ago | 0

| accepted

Answered
transparency line of polar graph
theta = deg2rad(0:360); r = cos(theta).^2; a = polar(theta, r); a.Color =[1,0,0, .2]; % use the last value to control the tra...

24 días ago | 0

| accepted

Answered
how can i combine two graph which is linear and semilogy into one graph by using legend,the input is same for the linear and log graph
x = (1:10); y1 = rand(10,1); y2 = 10.^(3*randn(10,1)); yyaxis left plot(x, y1, 'ro-') yyaxis right semilogy(x, y2, 'b*-')

24 días ago | 0

| accepted

Answered
How can i show only definite data values in bar plot?
X=1:7; Y=[100 50 35 20 8 7 6]; idx = 1:3; % select data to plot bar(X(idx), Y(idx)); text(X(idx),Y(idx),num2str(Y(idx)'...

24 días ago | 0

| accepted

Answered
How to draw a sidebar in polar plotting?
theta =0:(pi/180): (2*pi); r = cos(theta) ax=subplot(221); polar(theta, r); pos = ax.Position pos(1) = pos(1)-0.05; % adj...

24 días ago | 1

| accepted

Load more