Réponse apportée
Plotting audio signal with number of samples
% Read all data [x,fs]=audioread('Song.wav'); t = (0:length(x)-1)/fs; %t=linspace(0,length(x)/fs,length(x)); plot(t,x) xlab...

plus de 4 ans il y a | 0

Réponse apportée
How to Display Data in Table
v = (0:5:50)'; % use a column here a_n=(-0.01.*(v+50))./(exp(-(v+50)./10)-1); b_n= exp(-(v+60)./80)./8; a_m = (-.1.*(v+35))....

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
not compatible with the size
itr=0; % number of iteration for t=1:1:3 itr=itr+1; b(itr, :)=[sin(t) cos(t)]; % Two numbers for each iterat...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Gives the specific parameter value as set of value instead one value.
[Pgrid, Rgrid] = meshgrid(2:30, 6:25); % all combinations of P and R values z = zeros(size(Pgrid)); for i=1:size(Pgrid, 1...

plus de 4 ans il y a | 1

Réponse apportée
problem in drawing the frequency spectrum of frequency modulated signal in matlab
fs=100000; %sampling frequency ts = 1/fs ; % time interval between sample point t = 0 : ts :0.02; % scale of time, maximu...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to do Gaussian Filter 1D?
x = readtimetable("IAGA Daily Magnetic Data (1m) Extraction 04-Jul-2021 (CTS).txt") w = gausswin(10, 2.5); w = w/sum(w); ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to save the accuracy and loss of every batch in deep learning?
Check out the "train" command you use. For example "doc train". You can include the train record as your output such as: [tra...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Help adding external functions
MATLAB has no external function like c and other languages. It relies on "path" to figure out the external functions. You can ...

plus de 4 ans il y a | 0

Réponse apportée
convert code from excel to matlab
% x = IF(AND(2*abs(d)>3*abs(l-n), 2*abs(d)>3*abs(r-n)), 2*abs(d), IF(3*abs(l-n)>3*abs(r-n), 3*abs(l-n), 3*abs(r-n))) if (2*abs(...

plus de 4 ans il y a | 0

Réponse apportée
Avoid Displaying the data simultaneously in the command window
Yes. You can suppress the display in command window, which also speed up your program when a lot of data is to be displayed: *...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Custom equation error in fitting toolbox
The following function will result in undefined value for sin(x)=0 sin(a*sin(x))/(a*sin(x)) You can change this into sinc func...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Display values on plot
You can use text. For example t = 0:.01:2*pi; x = cos(t); plot(t, x); text(0.2, 0.4, {'This', 'is', 'a', 'test'}, 'EdgeColo...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Simple way to "shrink" the dashes on a line
Try this: https://www.mathworks.com/matlabcentral/fileexchange/1892-dashline

plus de 4 ans il y a | 0

Réponse apportée
Problem using 'dlmwrite' into .txt file which contains 19/20 digit intergers
MATLAB double data type cannot hold so many digits in your imput data. It will round off the data to what-so-ever a double type...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Write a function called minmax
minimax(randn(4,4)); function [x, y] = minimax(A) x = max(A(:)); % use colon here to find the max of all elements in 2d...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Selecting numbers ending in a specific digit from a matrix
% Assume the numbers are integers x = randi([-2000,2000], 100, 1); % The number end with 4 or 9 x1 = mod(abs(x), 10); idx = ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to make narrow band noise
cf1 = 2000; % central fq bw = 0.25; % bandwidth in octave low_f1 = cf1 / 2 ^ (bw/2); % lower limit of th...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to change markers on axes to be on the opposite side and how to add more markers in between that are smaller
plot(rand(20,3)) h=gca; h.XMinorTick = 'on'; h.TickDir = 'out';

plus de 4 ans il y a | 0

Réponse apportée
Ho to find peaks at step graphs?
Try to "detrend" the data first; then apply "findpeaks".

plus de 4 ans il y a | 0

Réponse apportée
How to do running another .m file that calls this .m file?
Save the followint into a file, for example, 'my_script.m': x = [5 10 12 3]; y = [11 8 3 3]; plot(x,y, 'g') In a separate sc...

plus de 4 ans il y a | 0

Réponse apportée
Convert Python code to Matlab code
% create some files for testing writematrix([3 4], 'test1.txt'); writematrix([5 6], 'test2.txt'); dir folder_path = ''; c...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Count word except some special case
x ='some text here with a and an and the'; % you can use "lower" to convert it into lower case % % consider "split" to split ...

plus de 4 ans il y a | 1

Réponse apportée
How to convert point plot to line plot?
Fp = 1000; %Bandpass Freq Fs = 2000; %BandStop Freq SF = 10000; %Sampling Freq Pr = 0.1; %Passband ripple Sr = 0.001; %S...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
how to use a while loop for switch case
repeat = true; while repeat transactionType= input('1:withdraw 2:deposit 3:account balance 4:end use'); repeat = fals...

plus de 4 ans il y a | 0

Réponse apportée
Can someone help me understand this code?
[throwAgain, RV]=MCO_throwAgain() function [throwAgain, RV]=MCO_throwAgain() % MCO_throwAgain outputs the number of random thr...

plus de 4 ans il y a | 1

Réponse apportée
How do I use a loop to remove all of the noise signal segments?
load signal % detect the env y = sqrt(2)* movstd(x, [200 200]); figure plot(x); hold on plot(y) % extract signal z...

plus de 4 ans il y a | 0

Réponse apportée
Inputting Date Time data and presenting as a graph
A = readtimetable('08_underwater.csv') A.Properties.VariableNames{1} = 'Light'; plot(A.Datetime,A.Light)

plus de 4 ans il y a | 0

Réponse apportée
How to identify the hourly/daily missing data points?
% Assume you have the observation as a datenum vector % Here we generate an example datenum vector observation = datenum(2021,...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
FUNCTION shift of vector's position
Here is some pseudo code: %1. Let the vector index be idx = (0:n-1) + 1 %2. When rotating to right by "shift" (which can be ...

plus de 4 ans il y a | 0

Réponse apportée
how to create an input window for more than two variables
prompt = {'r1','r2','r3','r4','o2','o2p','o2pp'}; dlgtitle = 'input'; dims = [1, 35]; answer = inputdlg(prompt,dlgtitle,dims)...

plus de 4 ans il y a | 0

Charger plus