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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 1

| accettato

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 1

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 1

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 1

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 1

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

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

oltre 2 anni fa | 0

| accettato

Carica altro