답변 있음
Plotting a curve using two interdependent intervals
You need array division ./ instead of / v=0:373; td=0.5; ts=0.2; g=9.81; a=0; p=1.204; cx=0.35; cz=-0.05; ax=1.77; m=1240; u=1...

4개월 전 | 0

답변 있음
Generate specific binary combination
You can put the dec2bin inside the loop so it won't be a big array. N = 4; for i=0:2^N-1 c = dec2bin(i, N) - '0' end

4개월 전 | 1

답변 있음
why the real matrix becomes complex number when transfered to cell
You won't get complex output if FD is real. Check type of FD. S=15; %smaller N=6; FD = rand(N*S, S); FY=cell(S,S) f...

4개월 전 | 0

답변 있음
How can I use various colors to fill the area under a normal distribution curve?
data = randn(8192, 1); h = histfit(data); pd = fitdist(data,'Normal') figure; x = linspace(-4*pd.sigma, 4*pd.sigma, 1001);...

4개월 전 | 1

답변 있음
problem of using findpeaks
load(websave("19year.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1553817/19year.mat")) % It seems tha...

4개월 전 | 1

답변 있음
pdeplot with same colorbar range
Use clim for each subplot. figure; subplot(3,1,1) pdeplot(model,"XYData",u(:,1),"Contour","on", "ColorMap","jet") clim([0 76...

4개월 전 | 0

| 수락됨

답변 있음
issues with making a matlab firfilter
%[x, fs] = audioread('SunshineSquare.wav'); load handel.mat audiowrite("handel.wav", y, Fs); [x, fs] = audioread('handel...

4개월 전 | 0

답변 있음
how to use writetable for one sheet?
inputData = [0.001 0.1; 0.003 0.1; 0.006 0.1; 0.1 0.09; 0.3 0.08; 0.5 0.07; 5 0.01; 7 0.005; ...

4개월 전 | 1

| 수락됨

답변 있음
How to store each iteration of a loop as it's own varible.
syms k h g_dot T_inf L delta_x %symbolic varibles. T = sym('t',[8,1]); EQ = sym('eqn',[8,1]); n = 8; %for i = n-(n-1):1:n ...

4개월 전 | 0

| 수락됨

답변 있음
how to get real frequency components using MUSIC compute frequency?
rng default n = 0:199; f1 = 0.257/2; f2 = 0.2/2; fs= 2; % fs (fs>2*max(f1, f2) % generate signal according to f1...

4개월 전 | 0

답변 있음
A problem with xtick
It works here without problem. S=load(websave("LandauData.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files...

4개월 전 | 0

| 수락됨

답변 있음
How to plot specified data points on a polar plot with curved lines, instead of straight lines
c_2 = [780.980150003248 900.818303825083 956.494860478838 855.216748671708 999.328305026861 784.311636929536 806.164595552563] ...

4개월 전 | 0

답변 있음
How to write a diagonal rectangular matrix
You can use toeplitz function. % Smaller n, m here n = 10; m = 8; A = diag(21*ones(n,1)) + diag(-4*ones(n-1,1),-1)... ...

4개월 전 | 0

| 수락됨

답변 있음
Bode plot of individual poles and zeros
z = 1000; p = [10 10 100]; k = 200; bode(zpk(z, p, k), 'k'); hold on for i=1:length(z) bode(zpk(z(i), [], 1/z(i)), ...

4개월 전 | 0

답변 있음
How can I plot multiple signals in a single plot? Please give me suggestions which functions have used for this.
% Generate som data fs = 1000; t=(0:1/fs:1)'; f = 10:10:40; x = sin(2*pi*t*f); x = x + 0.1*randn(size(x)); n = size(x, 2)...

4개월 전 | 0

| 수락됨

답변 있음
How to retrieve data from a Excel sheet saved at a particular location in pc?
You need to provide the extension name (.xlsx ?) to the file.

4개월 전 | 0

| 수락됨

답변 있음
How do you output both variable values and names in a function?
You can consider to use struct which has field names. t = Epoch_calc(20231121) function t = Epoch_calc(recorded_date) %EPOCH_...

4개월 전 | 0

답변 있음
I have an Excel sheet with headers of different depths and the numbers are not being read (ex.: d=-12.82m is being read as x_12_82M),
% The first row is treated as var names. Use preserve to keep the original % format a = readtable("https://www.mathworks.com/...

4개월 전 | 1

| 수락됨

답변 있음
How do I form a matrix from an array of rows and columns
A=ones(10); a=[1 3 5 6 9]; b=[1 2 4 7 9]; A(sub2ind(size(A), a,b)) = 0; A

4개월 전 | 1

| 수락됨

답변 있음
how to create shape on xy surface?
websave("variable.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1538662/variable.mat"); S = load('varia...

4개월 전 | 0

| 수락됨

답변 있음
How to create a pulsing sound/use duty cycle
It seems that nSeconds should be 0.5s. Each pause should be also 0.5s. Thus it repeats 60 time in a min. Fs = 8000; %# S...

4개월 전 | 0

| 수락됨

답변 있음
Need Help with FFT Analysis and Power Factor Calculation in MATLAB
Here is the work flow: 1.Read the CSV data in MATLAB with the "t" and "i(t)" column header as a table x = readtable("https:/...

5개월 전 | 0

답변 있음
Can I access the code for my packaged app?
Perhaps the most straightforward way is to convert your m-code to pcode (doc pcode for more details). Compiling is another optio...

5개월 전 | 1

| 수락됨

답변 있음
I would like to create an array to store a password, website combo.
Use string array instead of cell array for efficiency. You can also considre to use table. pa = ["abc", "def"] pa = addPasswo...

5개월 전 | 0

답변 있음
call function with multiparameter:what is the best solution?
You could also use arguments block. doc arguments for more details. a)CaricoSistemi2Last_Struct(Settings) b)CaricoSistemi2Las...

5개월 전 | 0

| 수락됨

답변 있음
Error using plot: Not Enough Input Arguments
Your data is not in right format. Here is one way to convert the string to number. % Experiment 4 % Computations and Generate...

5개월 전 | 1

| 수락됨

답변 있음
How do I write several variables to a table with row labels?
% Your data MeanAmplitude = rand(); AmpError = rand(); MeanFrequency = rand(); FrequencyError = rand(); % Name can be an...

5개월 전 | 1

| 수락됨

답변 있음
How to rotate a map?
It is upside down. Add the following: axis xy

5개월 전 | 0

답변 있음
What is different between FFT and SHIFTFFT
First, it is not correct to say which is better unless you define what is "better". fft(x) has better resolution but higher si...

5개월 전 | 0

| 수락됨

답변 있음
How to close only anova figures
How about collecting the desired figure handles in an array when creating the figures, such as h(i) = figure(...); At the en...

5개월 전 | 0

더 보기