Beantwortet
Interpolation using Excel Data
One approach — % C1 = readcell('FluxData.xlsx') T1 = readtable('FluxData.xlsx') xvar = T1{1,3:end}; yvar = T1{2:end,2}; ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Read excel file with Matlab
One option is to use the datetime 'ConvertFrom' name-value pair. For the ‘value’ argument, both 'excel' and 'posixtime' work, ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
I hava wav file and need to plot spectrogram in matlab
The argument to spectrogram must be a vector. I suspect the error is that ‘y’ is a (Nx2) matrix, and that is throwing the error...

fast 3 Jahre vor | 0

Beantwortet
Nonlinear Regression using a gaussian in a lattice
One approach (using smaller matrices for efficiency and to demonstrate and test the code) — syms a sigma dr = sym('dr',[3 3]...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why is NaN inserted in wrong position?
It should not do anything, because 5 is in row 2, not row 1. That aside, you need to index into ‘b’ correctly to get the desi...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
passing filenames to a dos command
See if the system function will do what you want. Also, see Run External Commands, Scripts, and Programs for a more extensive...

fast 3 Jahre vor | 0

Beantwortet
how can I plot the contours inside not outside?
What result do you want? Try this — figure F = openfig('untitled.fig'); Lines = findobj(F, 'Type','line'); for k = 1:nume...

fast 3 Jahre vor | 0

Beantwortet
how to include symbol on plot line into the legend?
The code plots two lines, however has only one legend entry, so the second series (with the '<' marker) does not show up in the ...

fast 3 Jahre vor | 0

Beantwortet
How to quickly group numerical data without giving bin sizes
I am not certain that there is a robust approach to this sorts of problem. For multivariable problems (each point is a vector d...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Finding similar rows with different I and M columns and create an average of them
Experiment with the unstack function to see if it will do what you want. (The necessary information is missing, so I cannot run...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot LTspice graph in Matlab in this case?
One approach — T1 = readtable('final_all1.txt', 'VariableNamingRule','preserve') T1.MagdB = str2double(extractBetween(T1{:,...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to obtain the values of R, L and C of a series RLC model of experimentally obtained frequency domain response data in MATLAB?
This is ‘circuit synthesis’ and it is (unfortunately) not trivial. A series RLC model: >--- R - L - C ---> Vin ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Genetic Algorithm (ga) terminating after a few generations
That is certainly consistent if it converges quickly, and especially if it produces a reasonable result. If your 'InitialPopul...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Help with jumping one position using circshift function in a for loop
The circshift function does not duplicate any values, so I don’t understand how you expect to get the ‘Tn’ matrix at the end. ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
I'm trying to make an image with data from a .txt file
Use readmatrix to read the file. To display the image, then do something like this — % writematrix(rand(80,10),'YourFile.tx...

fast 3 Jahre vor | 1

Beantwortet
Find mean of steps in broken signal
One approach — LD = load('y.mat'); y = LD.y; x = 0:numel(y)-1; Lv = islocalmax(y>25, 'FlatSelection','all'); start = s...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
how plot function sine wave in two variable in MATLAB like y(x,t)=a* sin(wt-kx)
Provide the appropriate constants, then perhaps this — % y(x,t)=a* sin(ωt-kx) % at ω=2*π* λ* c*t ,k=2*π/ λ lambda = ...

fast 3 Jahre vor | 1

Beantwortet
how to correct the trendline of a 3d surface plot?
One approach is to use the scatteredInterpolant function with the line coordinates as inpout — [X,Y,Z] = peaks(50); [xmin,x...

fast 3 Jahre vor | 0

Beantwortet
Calculation of y axis values or cdf values from given x axis values using another plot of best fit cdf
It would help to have your code and data. Assuming it is similar to this approach, this may do what you want — [f,x] = ecdf...

fast 3 Jahre vor | 0

Beantwortet
calculate integration of function
This term, near the beginning of what I call ‘EXPR’ diff(Phi,y,2)+diff(Phi,z,2),t,1)+ ... needs an extra diff call: diff(...

fast 3 Jahre vor | 0

Beantwortet
How to represent bar plots efficiently?
One option is to use a logarithmic scale on the y-axis, and then tweak the ylim limits — % Example data (replace with your da...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Efficient alternative to find()
The interp1 function with the 'previous' interpolation method may be appropriate here — x0= [1 ,1.1, 1.3, 1.5 ,1.6, 1.7]; y0 ...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
how to remove baseline wander from ECG?
I generally prefer to use the highpass or bandpass functions for these problems, although you are certainly free to design your ...

fast 3 Jahre vor | 0

Beantwortet
Value for Function with 2nd order Central difference scheme
See First and Second Order Central Difference and add enclosing parentheses to the numerator of your implementation of the cosh ...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
why is this code not running?
What does ‘not running’ mean? What is not working correctly? When I supply values for ‘TimeValue’ and ‘Pdispatch’ it runs wi...

fast 3 Jahre vor | 0

Beantwortet
Help using grid in nexttile and tiledlayout
If you want the tick labels just above the x-axis, that is certainly possible. Try this — data = readmatrix('GeoUNAM0404201...

fast 3 Jahre vor | 0

Beantwortet
Maximum recursion limit of 5000 reached. PSO algorithm
Your function is: function y = obj_func(x) and the line throwing the error is: p_best_scores = arrayfun(@(i) obj_func(posit...

fast 3 Jahre vor | 0

Beantwortet
Solve non linear equation with vector
It looks like you want to do a nonlinear regression. Perhaps this — dados = array2table(sortrows([10*randn(12,1)+35,rand(12...

fast 3 Jahre vor | 0

Beantwortet
Plot the unit step response of an RLC circuit, (based on the transfer function) and sketch the response.
Use the tf function, specifically: s = tf('s'); and go from there. First assign the component values, then you can type in t...

fast 3 Jahre vor | 0

Beantwortet
Is it possible to restore all the variables from the previous session?
One approach could be something similar to: How to save data from Genetic Algorithm in case MATLAB crashes? - MATLAB Answers - M...

fast 3 Jahre vor | 0

Mehr laden