Community Profile

photo

Chunru


DSO National Laboratories

Last seen: Today Active since 2013

Matlab user since 1990

Statistics

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

View badges

Content Feed

View by

Answered
what is the difference between assigning with and without range?
There should not be major performance difference between "a=b" and "a(1:N)=b". The assignment with range allow partial assignme...

etwa 7 Stunden ago | 0

Answered
Iterative solution for a non-linear equation
Sa = 2.7956; A = 2.24; B = 0.5547; % Change the original code to the following. Otherwise not working. f = @(ag_p) ag_p*(A+...

etwa 7 Stunden ago | 0

Answered
How can I visualized the multiple tables read from a for loop in the variable space?
Create a cell array of tables: for i = 1:5 filename = sprintf('variables_%d.csv',i) fileID(i) = fopen(filename,'r'); ...

etwa 7 Stunden ago | 1

Answered
Is there any option like zline?
If all you want is to plot x-y-z axis passing through origin, then you can do the following. (assuming that origin is somewhere...

etwa 8 Stunden ago | 0

| accepted

Answered
Discrepancy between eigenvalues and eigenvectors derived from analytical solution and matlab code.
First, the sign in the last element of H should be '-' rather than '+' as in your question. Second, "doc eig" command for the o...

etwa 9 Stunden ago | 0

Answered
GA for single variable
Yes, you can. Howerver, no gurantee of the optimal solution (just like any other non-linear optimization approaches). a = 1; ...

etwa 11 Stunden ago | 0

Answered
Signal is not getting filtered properly
Try design the filters as follows. The filter will attenuate the frequency content below 500Hz. When plotting spectrum, you may...

etwa 13 Stunden ago | 1

| accepted

Answered
"Warning: Negative data ignored" for title(), xlabel(), ylabel()
There is no problem except for the warning: x=(-1:.1:10); semilogx(x, cos(x)) xlabel('x') ylabel('y') title('test')

etwa 14 Stunden ago | 0

Answered
How i fix the error "Matrix dimensions must agree?"
Which version of matlab you are using? xi=randi([10,30],4,4) A=xi(1,:) B=xi(:,1) % arrays with implicit expansion for newe...

etwa 16 Stunden ago | 0

Answered
Matlab says, I reached the max limit of recursion: " Maximum recursion limit of 500 reached. "
Try "clear all" before running the code. Change "Histogram2" to "histogram2" (case sensitive). It seems there is no recursive ...

etwa 16 Stunden ago | 0

Answered
check ismember for each element individually
Doc ismember to see if it meets your requirement: a=[ 1 2 3 3 5 6 6]; b=[1 2 3 5 6]; [Lib, Loca] = ismember(b, a) a(Loca) %...

etwa 16 Stunden ago | 0

Answered
How can I plot some fft data in a different way?
% Assume there are 3 spec (corresponding to phi) nf = 20; nt=15; nspec = 3; sp = randn(nf, nt, nspec); % reshape the spectr...

ein Tag ago | 0

Answered
find elapse time with date rollover
tstr=[ "11:58:00" "11:59:00" "00:00:02" "00:02:04"]; t = datenum(tstr, 'HH:MM:SS') d = diff(t)*24*3600; % check for negat...

ein Tag ago | 0

Answered
How can I set the format HH:MM to plot an array?
t = datetime(0,0,0,15,0,1:3500); % Y,M,D,HH,MM,SS x = randn(3500, 1); plot(t, x) datetick('x', 'HH:MM') xlim(t([1 end]))

ein Tag ago | 2

| accepted

Answered
How to reshape 3D matrix ?
% Generate data (using number 1,...48 to represent a,...V) Z = permute(reshape(1:48, [4 4 3]), [2 1 3]) % First permute the ...

ein Tag ago | 0

Answered
How do I sort automatic variables in matlab?
You have N points, , n=1, ..., N. You want to compute the distance between any two points. So there are pairs altogeter, whi...

2 Tage ago | 1

Answered
How to adjust the view of colorbar to be the same as contourf
You may want to create the colorbar yourself that attached to the data as follows: n = 50; x = 100*rand(n,n); % Add the custo...

2 Tage ago | 0

| accepted

Answered
confusion during finding out the mean of a 3d vector
A 2-d example (applicable to 3d in principle). a=[1 2; 3 3; nan 4; nan nan] % mean of [1 2 3 3 4] after omitti...

2 Tage ago | 2

| accepted

Answered
Applying Two Filters Simultaneously
Fs=24414; t=0:1/Fs:435.13; X=rand(size(t))+2; % random noise + DC %RawData; Wn=10; % high cutoff [b,a]=butter(5,Wn/(Fs/...

3 Tage ago | 0

Answered
Time and GPS data processing
% Read data from file T = readtable('resultcopy.txt'); % Convert to datetime format T.Var1 = datetime(num2str(T.Var1, '%06d')...

3 Tage ago | 0

Answered
Why is the Y axis still in linear scale after setting 'YScale' to 'log'?
The yaxis is indeed in log scale. However, the ylim is in a small range as set by ylim ([0.6 1.1]) so it looks approximately li...

5 Tage ago | 0

Answered
Plotting the the acceleration data of the degree of freedom versus the time.
Make sure time and acc have the same size time =[0: length(acc)-1]*0.02; plot (time,acc,'r-');

5 Tage ago | 1

Answered
How to input data in listbox
Here is the example from documentation of uilistbox: function selectlistbox fig = uifigure('Position',[100 100 350 275]); ...

8 Tage ago | 0

Answered
How to model a channel with mesh
Use some 3D software (such as blender) to create the 3d model and then export to a format matlab can read (eg. stl). Otherwise,...

10 Tage ago | 0

| accepted

Answered
How to display two dataset comparison in one map graph?
With the same map region, you can plot the difference of data. lat = linspace(10, 20, 11); lon = linspace(5, 15, 11); [latg, ...

10 Tage ago | 1

Answered
How do i combine multiple cells into one
c1 = {rand(2), rand(2)} c2 = {rand(2), rand(2)} c3 = {rand(2), rand(2)} c =[c1; c2; c3]

10 Tage ago | 0

Answered
Plotting in 3D from a table
'doc griddata' for more details. rng('default') xy = -2.5 + 5*rand([200 2]); x = xy(:,1); y = xy(:,2); v = x.*exp(-x.^2-y.^...

10 Tage ago | 0

Answered
Seeking an efficient method for using 'scatter3' to create a 3D scatter plot of fixed receiver positions.
Try scatter3: t = 0:pi/5:4*pi; xt = sin(t); yt = cos(t); h = scatter3(xt,yt,t,40, t*30, 'MarkerFaceColor', 'b'); colormap(h...

10 Tage ago | 1

Solved


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

10 Tage ago

Solved


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

10 Tage ago

Load more