Community Profile Chunru

Last seen: 3日 前 2013 以来アクティブ

Matlab user since 1990

Statistics

All
• • • • • • • • • • • • バッジを表示

Content Feed

How Do I Properly Format my Bar Graph?
How about this? x = [10 30 36.7 50]*1e9; y = rand(size(x))*30; bar(x, y); ax = gca; ax.XTick = x; ax.XAxis.Exponent = 9; ...

6日 前 | 0

How to plot the required number of subplots?
xs=8; v=1; L=20; ta=0.2; t=1; n=1:1:40; %x=0:0.1:20; x=0:0.1:60; position = 0; % position of plot in subplot fig_num = ...

7日 前 | 0

| 採用済み

How to plot the required number of subplots?
Since you have applied an amplitude factor of something like exp(-n.^2). The amplitude quickly drop to zero at larger iteration...

7日 前 | 0

How to create multiple matrices with multiple variable?
n = 5; % 100 % each slice of a is a matrix you want to produce: a = eye(3).*reshape(1:n, [1 1 n])

7日 前 | 0

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...

14日 前 | 0

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 + ...

14日 前 | 0

| 採用済み

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 ...

14日 前 | 0

| 採用済み

How do I find a specific x values in an array(?) of x,y locations?
% Now you have posted your data: load('location array.mat') whos % Your data is 2670x2 locations % floating point inside co...

19日 前 | 0

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;...

19日 前 | 1

| 採用済み

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...

19日 前 | 0

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...

20日 前 | 0

| 採用済み

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...

22日 前 | 0

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);

22日 前 | 1

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...

26日 前 | 0

How to delete 'Userdata' in hObject of Matlab GUI?

27日 前 | 1

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...

27日 前 | 0

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...

28日 前 | 1

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

28日 前 | 0

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...

28日 前 | 0

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 <...

28日 前 | 0

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...

29日 前 | 0

| 採用済み

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...

29日 前 | 1

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...

29日 前 | 0

| 採用済み

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 ...

29日 前 | 0

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)

30日 前 | 0

Average of 3 one dimensional matrix loaded by .mat file

30日 前 | 0

| 採用済み

"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 ...

30日 前 | 0

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))

30日 前 | 0

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...

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;...

| 採用済み