Respondida
Parsing data from complicated text files
hello this is my 2 cents code to import the required data. The function will give you the time values (char array) and the num...

más de 5 años hace | 1

Respondida
unable to perform assignment because the left and right side are unequal
hello the first error occurs because at line 2417 of your data file Pressure = : -171.05 gauss wich is clearly not the "go...

más de 5 años hace | 1

Respondida
How to fft time signal and get given number of fft points and frequency resoution?
hello again your fft resolution depends on the sampling freq (Fs) and your fft length (nfft) df = Fs / nfft see example code ...

más de 5 años hace | 0

| aceptada

Respondida
How do i use textscan to extract some of the numbers with certain pattern (not all the numbers) from one sentence in text file?
hello esther that was not my easiest code of the day, but finally managed to get it done ! attached my input / output text fi...

más de 5 años hace | 1

| aceptada

Respondida
Savitzky-Golay polynomial order returning NaN above 110
hello I suspect you are confusing the order and the window length of the filter You should try first with low order filters (...

más de 5 años hace | 0

| aceptada

Respondida
PLEASE HELP ME!! :(
hello Felika don't panic !! the code does exactly what you wrote by hand. It just a matter to know how to make a loop work w...

más de 5 años hace | 0

Respondida
How to plot horizontal line with waveform like the green line in the photo
hi looks like this would be the RMS value of the signal; so you simply have to calculate that rms value and plot it with the s...

más de 5 años hace | 0

Respondida
Desired input signal generation based on input and measured output and expected output with data comparision
hello so this my suggestion / code for you i first didn't understood evrything, so first thing was to try time align the 3 d...

más de 5 años hace | 0

| aceptada

Respondida
Extracting only real numbers from a vector containing both real and complex values
hello see code below : A = [ -0.4406 - 1.5696i , -0.4406 + 1.5696i, 1.8812 + 0.0000i]; tol = eps; ind = find(abs(imag(A))...

más de 5 años hace | 3

Respondida
How to count the number of iterations in a loop?
hello at the very beginnin gof your ode you should initilalize a counter k = 0; then in the loop , you do : if Dist>...

más de 5 años hace | 0

| aceptada

Respondida
How to calculate and plot trendline (fit curve) in matlab?
hello you can do a curve fit on your data converted to log scale ; here a demo below : x = [7.94, 16.23, 32.92, 66.8, 135.52...

más de 5 años hace | 0

Respondida
Sum function discrite time
hello this is an example of echo simulation - please adapt to your parameters hope it helps clear all; close all; infile...

más de 5 años hace | 0

Respondida
Own Welch procedure vs pwelch function
hello for me , your function compute the autospectrum and not a PSD to do a PSD : PSD = Y.^2/df; with df = Fs/nfft;

más de 5 años hace | 0

| aceptada

Respondida
Plot data from while loop
hello you have to index the error variables with Iteration otherwise you're overwritting each time (and you get only a sc...

más de 5 años hace | 0

| aceptada

Respondida
Colorize bar or line according to magnitude.
hello it's unclear how you want to associate color with 2 parameters (magnitude and the distance) fyi , this is one option : ...

más de 5 años hace | 0

Respondida
Finding the ramp response to a transfer function
You can use lsim function for any input t=0:0.01:10 slope = 2; ramp=slope*t; % Your input signal G = tf(poly([-2 -3]...

más de 5 años hace | 0

| aceptada

Respondida
Comparing two row vectors to find constant slope for steady state condition
Hi again so I introduced the first and second derivative of c2 and plotted in figure 3 Attached is the function to do a finite...

más de 5 años hace | 0

| aceptada

Respondida
Nested for loop for showing cooling of different thicknesses in a plot
hello Kenneth simply moved the figure display before the last end clc clearvars close all %------------------------------...

más de 5 años hace | 0

| aceptada

Respondida
FFT of single max sided from signal
hello this is the code fixed : FYI, the frequency in your code is 200 and not 100 kHz as in image , but you can easily change...

más de 5 años hace | 0

| aceptada

Respondida
How to save to .txt using WRITEMATRIX ?
writematrix(num2str(M,'% .14e'),'M.txt','Delimiter','tab');

más de 5 años hace | 0

| aceptada

Respondida
why does spectrogram of stft shows different magnitude while changing the window size?
hello I was tired of not being able to understand why some matlab functions (mostly based on fft) would not scale the output a...

más de 5 años hace | 0

| aceptada

Respondida
Error using polyfit (line 44) The first two inputs must have the same number of elements. Error in A12Prob2_airPolution_spetrone (line 37) coef_co2 = polyfit(co2_data, sf6_data,1);
hello this is the fix ! the longer file data must be resampled (interpolated) on the time dates of the shorter file. clc ...

más de 5 años hace | 0

Respondida
how to convert ADC values of ADXL335 connected to a beam using ARDUINO UNO to FFT in Matlab
hello attached one example to do fft (with averaging if needed) and spectrogram you'll probably have to adapt the way you rea...

más de 5 años hace | 0

Respondida
Read Multiple Entries from Text File
so this is the code , maybe there is still room for improvement , but I tested it ok vs the data file provided hope it helps ...

más de 5 años hace | 0

| aceptada

Respondida
How to search a keyword in text files and if it is found,write the string next to it in an excel file under a column ?
hello this is a first code to show the basic functionnalities (getting a 1 or 0 result depending of presence of "import from" ...

más de 5 años hace | 0

| aceptada

Respondida
DC/offset value
hello - simply by removing the mean value : signal = signal - mean(signal);

más de 5 años hace | 0

Respondida
Read Multiple Entries from Text File
hello you can concatenate datas and vectors of zeros like that : a = [zeros(1,32) 0.237024 0.248206 zeros(1,...

más de 5 años hace | 0

Respondida
How to fit data when yaxis in log scale and plot the fit?
so this is my proposal - see the lines of your code I modified ; look for comments including : % modified code the origina...

más de 5 años hace | 0

Respondida
How can I plot longitude, latitude and egm2008 geoid height of about 1421 grid points using the color bar as the height
hello problem fixed - see the parameters used in importdata (delimiter and num of header lines) also I noticed the name of th...

más de 5 años hace | 0

Respondida
FIND function with multiple conditions
hello Nadia I have tried another approach , by looking at the 2 nearest points to zero crossing points of the vector defined as...

más de 5 años hace | 0

Cargar más