Beantwortet
An EEG dataset .txt , I want to transpose the rows and columns for all files.
I would still keep them as they are in the files, and transpose them after you read the files. EEG = readmatrix('S9 HC.txt') ...

fast 3 Jahre vor | 1

Beantwortet
How to import range of text files into different matrices?
I do not know anything about the file contents, so the easiest way would be to save them to cell array elements. D = cell(50,...

fast 3 Jahre vor | 0

Beantwortet
I have an error saying 'Operator '*' is not supported for operands of type 'function_handle'." and I do not know what to do.
Function handle calls need to be evaluated. You code came close, however the syntax did not allow them to actually be evaluate...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Arrays have incompatible sizes for this operation.
The problem is: v = logspace(6, 11, 1000); % Using logspace for a smoother frequency range since everything else has a length...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Poctave bars next to each other
I cannot replicate your results with my prototype signal. The current ‘BarLayout’ property in your plot is 'stacked'. You ne...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Smoothing 3D surface plot and its color gradient
Experiment with the daspect function — filename = 'Data.csv'; data = readmatrix(filename); x = data(:, 1); y = data(:, 2)...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Pre-processing Data (PRV Signals)
The Signal Processing Toolbox resample function is specifically intended for signal processing and incorporates anti-aliasing fi...

fast 3 Jahre vor | 1

Beantwortet
Trying to do a Laplace transform on a discontinuous function
I initially wanted to see if piecewise would work. It didn’t. This is the result I get using heaviside to define the areas o...

fast 3 Jahre vor | 0

Beantwortet
Plots multiple lines-of-best-fits instead of just one
The data are missing, so an exact solution is not currently possible. The additional lilne could be that you are plotting bot...

fast 3 Jahre vor | 0

Beantwortet
Data analysis - How to recognize local peaks/different areas?
It would help to have the data. It is relatively straightforward to get the start and end times and then store the relevant d...

fast 3 Jahre vor | 2

| akzeptiert

Beantwortet
Why do i get an error saying "Unrecognized function or variable 'x'."
You have not defined ‘x’ specifically in your calling script prior to calling the function. Try something like this — x = ...

fast 3 Jahre vor | 0

Beantwortet
Trouble importing data from folder
I’m not certain that I understand what you want to do. If you want the number from the file name, perhaps something like thi...

fast 3 Jahre vor | 0

Beantwortet
Linear Algebra Error: Matrix is close to singular or badly scaled.
I am not certain what you want to do. Consider using the pinv function.

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to evaluate an equation with sin and cos at different values in radians.
Vectorise it (note the element-wise operations) — x = [0; pi/2; pi; 3*pi/2]; f = (-0.05-0.01*x)./((5*x+0.3).*cos(x)+(0.2*x.^2...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Problem using tf to perform a transfer function.
You need to have the Control System Toolbox licensed and installed. With that, the code works appropriately — numg=[6 0 1];...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
How print the loop iteration value each time to show progress of loop during a run
I am not certain what you want to do, however when I have done something similar, I usually do something like this: k = 12345;...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I include legend entries only for an array and not for each line of data?
Create handles for each plot call, and then use the first elements of those handles as the first argument to legend — t = lins...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
how to speed ...i need very fast code
Putting the ‘a’ conditional tests outside the loop (and still within the tic-toc block) sppeds it up a bit — LD = load('matlab...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
pie chart creation with name (number) and corresponding percentage
One approach — number = [78;79;80;81;82;83;84;85;86;87;88]'; value = [4509;5239;6400;9074;11047;13147;15137;13909;6354;1152;1...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
problem with cell array e unique
There are 9 empty cells in ‘RankList’ and they were causing the problem. Try this — LD = load('matlab_RankList.mat') RankL...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Convert string into date
No loop needed. Just use datetime — str = "145601" DT = datetime(str, 'InputFormat',"HHmmss", 'Format','HH:mm:ss') .

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I make shaded error bar area instead of lines?
It would help to have your data. Perhaps something like this — x = logspace(-10, 5, 150).'; ...

fast 3 Jahre vor | 1

Beantwortet
polynomial fit for a schottky diode and evaluation of its characteristics (ideality factor, barrier height and I0)
It is relatively straightforward to do a nonlinear parameter estimate of the required parameters in MATLAB. Try this — T1 =...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to extend an array to a new dimension?
One option is the repmat function — a=rand(3, 4); b = zeros([size(a) 5]); for i=1:5 b(:, :, i) = a; end b ...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
curve fitting of a nyquist plot
I doubt that there is any direct way to fit it, for example to a nyquist plot. You would have to estimate the system first. T...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
Finding uncertainty of a slope
This is straightforward if you have the Statistics and Machine Learning Toolbox. Use regress to get the confidence intervals. ...

fast 3 Jahre vor | 0

Beantwortet
Interpolate data between two specified contours
I am not certain what result you want. The easiest way is probably to use the contour function itself to interpolate. Examp...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
how can I show all my output plots from a script at the same time
They probably all occupy the same relative position so they overlap. They are all there, with the later figures covering the e...

fast 3 Jahre vor | 0

Beantwortet
Help IFFT can not restore to original signal after filtering
The fftfilt function can do this relatively efficiently, however since you want to do it manually, try this — %USING REAL SIG...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error using interp3 "Error using griddedInterpolant. Grid arrays must have NDGRID structure"
The ndgrid function creates gridded data (in 2, 3, ..., n) dimehsions from its argument vectors. Considering the nature of yo...

fast 3 Jahre vor | 0

Mehr laden