Community Profile

photo

Chunru


Last seen: Today Active since 2013

Matlab user since 1990

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Pro
  • Knowledgeable Level 4
  • Number Manipulation I Master
  • Indexing I Master
  • 3 Month Streak
  • Revival Level 1
  • Commenter
  • Sequences And Series II Master
  • Speed Demon
  • Creator
  • Sequences And Series I Master

View badges

Content Feed

View by

Answered
Finding the required number of high frequency values from histogram
a = [randn(10000,1)-5; randn(10000,1); randn(10000,1)+5]; histogram(a) [y,edges] = histcounts(a); % Use the center of edges...

alrededor de 8 horas ago | 0

Answered
How to find out roll-off from magnitude response of filter in matlab
fs = 2000; [b,a] = butter(9,400/(fs/2)); [h, f] = freqz(b,a,16384,fs); h = 20*log10(abs(h)); [~, i3db] = min(abs(h - 10*log1...

alrededor de 10 horas ago | 0

Answered
Finding location of specific element from a MATRIX returns '0×1 empty double column vector'
[i,j] = find(abs(a-23.5975)<1e-20)

alrededor de 10 horas ago | 0

| accepted

Answered
How to move a signal to be on the x-axis
try "detrend".

alrededor de 12 horas ago | 0

Answered
String to number from array
You can use "readmatrix" function: % Generate the data file a = [290729 123456 13984 654321 13272 111111]; writem...

alrededor de 12 horas ago | 2

Answered
How to efficiently compare large multi-dimensional arrays together of different dimensions?
M = 512; N = 512; O = 136; P = 6; % Generate random matrix A = rand(M, N, O, P); thres = rand(O, P); % Thresh...

alrededor de 16 horas ago | 0

| accepted

Answered
cross-correlation between a vector and and rows of a matrix
x = randn(40, 5); % better to make it column dominant order for speed y = circshift(x(:,1), 5); for i=1:size(x, 2) ...

alrededor de 18 horas ago | 0

Answered
Should the filter frequency response contain magnitude greater than 3dB in magnitude?
if you have 10^-6 dB or lower, then the response is almost flat in amplitude. The design or something else is most likely wrong...

1 día ago | 0

| accepted

Answered
Plotting Response of Discrete Signals
https://www.mathworks.com/matlabcentral/answers/1458259-plotting-a-response-of-the-following-system#answer_792534

1 día ago | 0

Answered
Error while plotting the polar plot
e = 0.5; thet = -60:1:60; theta = thet .*(pi/180); c = cos(theta); p = 4*(1-e^2).*(c.^2) + (2*e - 1)^2; % q = 2*(1-e*e).*...

1 día ago | 0

Answered
Plotting a Response of the Following system
% 𝑦[𝑛] = −𝑦[𝑛 − 1] + 5𝑥[𝑛] + 2𝑥[𝑛 − 3]. b = [5 0 0 2]; % 5x(n), 2x(n-3) a = [1 1]; % y(n) + y(n-1) % From an ...

1 día ago | 1

| accepted

Answered
How do I refer to values that contain decimal points and integers (for example, 1.0000 ... and 1)?
a = b(cellfun(@(x) abs(x -1 ) <1e-10, b(:,1)),:);

1 día ago | 0

| accepted

Answered
Question about how to put several values in one histogram
You should not use histogram. You should use bar: bar([3 4 3]) set(gca, 'XTickLabel', ["Player" "Computer" "Draw"])

1 día ago | 0

Answered
How to find rest of the number in matrix ?
a = 1:10; I = find(a>5) aa = a(I) bb = a; bb(I)=[]; bb

1 día ago | 1

| accepted

Answered
who to write this function in another way?
fcn(-5) fcn(.34) fcn(4) function y = fcn(u) x0 = [-inf -0.9 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 0.9 1.5]; y...

1 día ago | 0

Answered
Comparing elements of two uneven lists of numbers
a1=[ 15 420 5778 6018 6388 ]; a2 = [ 414 1430 5762 6384 ...

2 días ago | 1

Answered
How to check a matrix is multibanded?
% Create a banded sparse matrix B = bucky; r = symrcm(B) a=B(r,r); imagesc(a); % Check if it is banded m = size(a,1); ...

2 días ago | 0

Answered
How to get the aircraft location from a flight path plot?
% Generate some data t = (7020:210:10080)'; lon = 102.915 - t/10080; lat = 1.363 - t/20000; heading = 153 + t/50040; % Cr...

3 días ago | 1

| accepted

Answered
How do I use a user input string to reference a structure that already exists?
Here is one solution without dynamically naming a variable: ... UserInput='ExistingStructure'; if exist(userInput, 'var') ...

6 días ago | 0

Answered
Group values of a vector into new vectors according to magnitude
A = [17 323 100 3 278 220 45 351 212 51] B = A(A>=0 & A<50) C= A(A>=50 & A<100) % Leave D for you

6 días ago | 0

| accepted

Answered
generating random numbers only 2 numbers
a = randi([0 1], [1 30])*3 + 1

6 días ago | 1

Answered
How to get the file names that start with the same letter in the folder?
fn = dir('T*.*') % you can use 'T*.T', 'T15*.bin', etc

6 días ago | 0

Answered
How to connect dots in figure?
% data x = randn(50, 6)*.5+(1:6); % 6 lines, 50 data points each line % if you really want to plot 50 lines, then: plot(x') ...

6 días ago | 0

Answered
combine different size vectors into one matrix
% use a cell array instead of separate variables e{1}=[2 3 4 5]; e{2}=[4 7 7]; e{3}=[8 8 7 4 2 5]; % find the longest vect...

6 días ago | 0

| accepted

Answered
Matlab 3D bar plot
xyz=[... 6.50319529000000 10 5 6.50463629000000 10 10 6.50548840000000 10 15 6.50607061000000 ...

7 días ago | 0

| accepted

Answered
How to combine and transpose arrays?
s1 = rand(5,1); s2 = rand(5,1); s3 = rand(5,1); s4 = rand(5,1); imp =[s1 s2 s3 s4]' % or imp1 = cat(2, s1, s2, s3, s4)' ...

7 días ago | 1

Answered
I need to read third coloumn and all rows of text file in matlab. Pls give your suggestions.
You can read all data (xyz.txt contains first part of your data). Then it is up to you to use which column of data. data = rea...

7 días ago | 0

Answered
How do I switch location of the largest and smallest elements of an array?
vect = randi(20,1,15) [~, imax] = max(vect) [~, imin] = min(vect) % swap tmp = vect(imax); vect(imax) = vect(imin); vect...

7 días ago | 0

Answered
Only graphing two out of three of my graphs
ch0 = ex32excel(:,2); ch1 = ex32excel(:,4); N = length(ch0); deltast = 2e-5; t1 = 0:deltast:deltast*(N-1); xlow=0.02394;...

7 días ago | 0

Answered
solving for complex numbers
A = 3+4j B = 3 -2j C = 2*exp(1j*deg2rad(50)) % Find out D yourself

7 días ago | 0

Load more