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
Color scale of scatter plot?
x = randn(100, 1); y = randn(100, 1); cmap = parula(512); cmap = cmap(1:360, :); % dark blue to green (360 colors) pos_...

alrededor de 4 horas ago | 0

Answered
How to get a line plot
x=[25 45]; y=[200 200] plot(x,y,Color='black') axis([20 50 100 400])

alrededor de 8 horas ago | 0

| accepted

Answered
not displaying eval in command window
Try this: for i =1 : length (signal_names) ImportedSignals = genvarname(cell2mat(signal_names(i)), who); eval([Import...

alrededor de 8 horas ago | 0

Answered
How can I find the intersection points between two curves and area between these curves?
% These are the Input parameters used w = 60; h = 350; T0 = 60; rho = 600; T= 3.175; N...

alrededor de 9 horas ago | 0

| accepted

Answered
Calculate mahalanobis distance of matrix for each row
A = [110 -100 0; 100 -100 0; 10 0 0; 0 10 0; 0 -10 20; 0 -10 10; 0 0 10;-10 -10 -10; -10 0 0]; mean_row = mean(A,1); whos d =...

alrededor de 10 horas ago | 0

Answered
how to add two binary digits of 8bit size?
a = '01001011'; b = '00100011'; c = '00000000'; % Cosider a carry bit carry = 0; % loop through from last bit to first ...

alrededor de 10 horas ago | 0

| accepted

Answered
select only one value every four (or different numbers) in an array
a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] b = a(4:4:16)

alrededor de 10 horas ago | 1

| accepted

Answered
How can I arrange a vector in ascending order
D = [3 6 7 2 -4 7 3 2 ] D1 = sort(D)

alrededor de 11 horas ago | 0

| accepted

Answered
Calculate covariance matrix for simple example
format longg temp = [1 2 4 2 5; 100 300 200 600 100; 10 15 20 10 30]; res = cov(temp.')

alrededor de 12 horas ago | 0

| accepted

Answered
How to start two plots with different origins.
p1 = [0 0]; % inital position for object 1 p2 = [2000 0]; v1 = [150 20]; % initial velocity for object 1 v2 = [-80 30...

alrededor de 13 horas ago | 0

Answered
pdf file direct download
url = "https://www.mathworks.com/help/pdf_doc/matlab/learn_matlab.pdf"; tic urlwrite (url, 'learn_matlab.pdf'); toc dir

alrededor de 15 horas ago | 0

Answered
How can i use string values saved in a cell array as variable names in a for loop.
You can put the result in a struct with field names corresponding to your Dist_type load Test_Data.mat Dist_type = {'Kernel', ...

alrededor de 15 horas ago | 0

Answered
To usa counties and state mape and shade with different color
warning off states = shaperead( 'usastatehi.shp'); % MATALB comes with usa states map .shp file You can download the county l...

alrededor de 16 horas ago | 0

| accepted

Answered
Generating Geometry Patterns at Scale
What does flattenong the plot of the red polygon mean? xCenter = 10; yCenter = 10; % Modification to the FAQ is the next two ...

alrededor de 17 horas ago | 0

Answered
how do i find the min value using for loop?
syms x smin = inf; % initialize smin for yr = linspace(0,1,10) f = sin(x); fL = [0 pi]; iL = [0 pi]; ...

1 día ago | 0

| accepted

Answered
Converting a 2d array into a 3d array
"it is taking lot of time" for what size of array? m=200; n=100; Z_int = rand(m, n); Z = nan(m,m,n); tic for i = 1 : size(...

1 día ago | 0

Answered
How Can I determine minimum value in a double array?
vect =[ 2.6660 2.2852 10.0000 3.2617 10.0000 10.0000 9.8532]; [vmin, idx] = min(vect)

1 día ago | 0

Answered
I want to colour the area between red line and black line below the intersection point. how am i going to do it?
c=[3,5]; A=[1,2;1,1;0,1]; b=[2000;1500;600]; y1=0:1:max(b); x21=(b(1)-A(1,1)*y1)./A(1,2); x22=(b(2)-A(2,1)*y1)./A(2,2); x2...

1 día ago | 1

Answered
How to vectorize the function?
fc=1e+8; % carrier fm=1e+3; % modulate fd=7.5e+4; % frequency deviation r=0.25; t0=0.0005; % reflection and delay w0=2*pi...

1 día ago | 1

Answered
How do I move an item in an array to the end of that array?
T = [1 5 77 10 15 20 25 33]; T1 = sort(T) % Method 1 T2 = T([1:2 4:end 3]) % Method2

1 día ago | 0

Answered
How to set x axis in a plot?
subplot(6,1,1:5); imagesc([1 8], [14, 22], randi(100,100)); subplot(8,1,8); imagesc([1 8], 1, [1 2 2 2 2 2 2 3 3]); set(gca, ...

1 día ago | 0

| accepted

Answered
How to create a moving average filter to a specific signal
x = readmatrix("2013.txt"); n = 7; % filter order y = filter(ones(n, 1)/n, 1, x); plot(x); hold on; plot(y); legend('Or...

1 día ago | 0

Answered
use matlab code to draw the joint PMF and CDF
[x, y] = meshgrid([0 1], [0 1]) z = [0.25 0.5; 0.125 0.125]'; stem3(x, y, z) xlabel('x'); ylabel('y'); zlabel('p')

1 día ago | 0

Answered
Extract Tables from within a cell
s = load("Tables") % i-th tables i = 1; t = s.Tables{i}

2 días ago | 0

| accepted

Answered
Populating a vector between upper and lower bound?
e0 = 0; % Initial strain values e_max = 4; % Max strain values inc = 1; % +ve increase, -ve decrease e_t ...

3 días ago | 0

| accepted

Answered
same number in the vector
h=[0.12;0.1;0.1;0.04;0.04;0.04;0.1;0.1;0.1;0.06;0.1] hu = unique(h); idx = sum(h -hu' == 0) > 1; hrep = hu(idx)

3 días ago | 0

| accepted

Answered
cluster points within given radius
n = 300; R = 350; x0 = 50; % Center of the circle in the x direction. y0 = 90; % Center of the circle in the y direction. an...

3 días ago | 0

Answered
Subplot with Geoaxes.
"geoaxes" cannot be the child of subplot. But we can set its position as follows (2x2 grid for example): for i=1:2 for j...

3 días ago | 0

Answered
Getting the a day of a month based on Vac(day,month)
calendar(2021, 3)

3 días ago | 0

Answered
convert real numbers to img form
a = 8 b = a*1i % method 1 c = complex(0, a) % method 2

3 días ago | 1

Load more