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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 1

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

Respondida
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: *...

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

Respondida
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';

más de 4 años hace | 0

Respondida
Ho to find peaks at step graphs?
Try to "detrend" the data first; then apply "findpeaks".

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 1

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 1

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

Cargar más