Answered
I asked before but i can not reach the solution, so how can we plot our 4th order polynomial with given data by using polyval()?
What do you mean by ‘i can not react the solution’? My previous (Accepted) Answer: how can we plot our 4th order polynomial ...

7 years ago | 0

| accepted

Answered
how can we plot our 4th order polynomial with given data by using polyfit and polyval ?
You have the correct idea, and correct code except for the polyval call. Try this: x=[0.1 0.2 0.4 0.6 0.9 1.3 1.5 1.7 1.8];...

7 years ago | 0

Answered
Extrapolating intersection points (signal processing/curve fitting)
Another approach: M = xlsread('DS0006.csv'); time = M(:,1); waveform = M(:,2); threshold = 3.2; zci = @(v) find(v(:).*ci...

7 years ago | 1

| accepted

Answered
Adding Dot For Linspace
Use the vectorize (link) function. The only change you temporatily need to make is to create your function as a character vec...

7 years ago | 2

| accepted

Answered
split big metric into small ones
You create a 3D matrix, that is (9,9,3249): M = rand(513); R = reshape(M, 9, 9, []); Rsize = size(R) Rsize = ...

7 years ago | 2

Answered
How would I enter the Differential Equation y''+100y=2sin(4t)
Use the simplify function: syms t y(t) Dy0 y0 Dy = diff(y); D2y = diff(y,2); Eqn = D2y + 100*y == 2*sin(4*t); ys = dsolve...

7 years ago | 0

Answered
How to insert an element after each number in a vector?
One approach: a=[10,2,40,58,100,90,40,30,4]; result = [ones(size(a)); a]; result = [result(:); 1]' producing: result = ...

7 years ago | 2

| accepted

Answered
How to simplify this complex equation using matlab ?
syms a b e l r Eq = 9*a^6*l - ((a^2*l*(b - 1)*(720*b^4*e^2 - 1440*b^3*e^2 + 720*b^2*e^2))/5 - (a^2*l*r*(b - 1)*(120*a^2*b^2*e ...

7 years ago | 1

| accepted

Answered
Width & Precision Number Formatting in Documentation
Interesting. That seems to be a typographical error in the documentation: ‘Example: The input arguments ('%6.4f',pi) are equi...

7 years ago | 0

| accepted

Answered
Fit Lognormal function on already generated bins
Another option is to fit the CDF to estimate the parameters: x = lognrnd(0.5, 0.75, 1, 100); ...

7 years ago | 0

Answered
FFT for the given data to find the dominant frequency
Try this: [D,S] = xlsread('forcecoefficients1.xlsx'); t = D(:,1); Cl = D(:,2); Ts = mean(diff(t)); Fs = 1/Ts; Fn = Fs/2...

7 years ago | 2

| accepted

Answered
how to draw Superimposed dT/dt versus time and temperature curves represent
One option would be to use the hold (link) function.

7 years ago | 1

| accepted

Answered
Integral Error in Dimension
You need to use element-wise operations in several places in ‘integrand’ and ‘grsp_fun’. With those corrected, your code is: ...

7 years ago | 0

| accepted

Answered
How to get a Negative Positive Negative Y axis labels?
The y-tick values must be increasing. However you can choose the y-tick labels to be (almost) whatever you want. Try this: ...

7 years ago | 0

| accepted

Answered
CVS yy-axis plot
Try this: plotData = importdata('nmosesd.csv') plotData.colheaders(1) plotData.data(1) figure(1) clf hold on grid minor...

7 years ago | 1

| accepted

Answered
Change Width for YAxis (both) but not the grid
That is a bit more complicated than it would otherwise appear to be. This works in my test plot: ax(1).YAxis(1).LineWidth =...

7 years ago | 0

| accepted

Answered
Extracting values corresponds to a particular day from an Excel file
For the data you posted, this seems to work: DC = {'12/01/2012 00:06 PST' 29.64 '12/01/2012 00:21 PST' 29...

7 years ago | 0

| accepted

Answered
How to determine the absolute time of arrival of a signal
I assume that you have a continuous recording of sound as a function of time. One way could be to use a bandpass filter with a ...

7 years ago | 1

| accepted

Answered
How to write data to an excel file?
The table function prefers column vectors. I would save them as columns: data1 = 1:1:10; data2 = 10:10:100; data =[data1(:)...

7 years ago | 0

| accepted

Answered
How to plot graph the values of given program
Try this: A= [0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 1...

7 years ago | 0

| accepted

Answered
Plotting yyasix in Matlab from csv file
Try this: D = xlsread('pce and power at 10k for lvt.csv'); figure yyaxis left plot(D(:,1), D(:,2)) yyaxis right plot(D(...

7 years ago | 0

Answered
Why this message appears?
It appears because you are multiplying two row vector using matrix mulktiplication. You need to use element-wise array multip...

7 years ago | 0

| accepted

Answered
How to preserve data in array in function during multiple calls of it.
I do not entirely understand what you are doing. Consider using your array as a persistent (link) variable.

7 years ago | 0

| accepted

Answered
Anyone help me with the format of fprintf
The easiest solution is likely to modify your first fprintf statement, and add a second fprintf to print the final ‘-2’: fprin...

7 years ago | 0

| accepted

Answered
How do I split a string of numbers in n+1th successive intervals and put them in a array or matrix.
Another option is to use a loop: n = '123456123456123456123'; % Convert To Character Array len = 8...

7 years ago | 1

| accepted

Answered
Table not structuring the way I want
The table function works best with column vectors for each variable. Your code creates row vectors. The easiest way to corre...

7 years ago | 0

| accepted

Answered
While Loop Line Plot??
I have no idea what the arguments to your function would be, so I can’t run your code. Note that this assumes that the calcul...

7 years ago | 0

| accepted

Answered
how to segment the signal based on amplitude change.
Use the findchangepts (link) function (introduced in R2016a): D = load('t1.mat'); t1 = double(D.t1); [cp,res] = findchange...

7 years ago | 0

| accepted

Answered
How to return the maximum value of a vector without using the built in function max(x)?
Apparently, you also cannot use a built-in sort algorithm. That leaves you the option of coding your own bubble-sort algorithm,...

7 years ago | 0

Answered
I want the user to input which loop to run
If ‘A’ is a character or string (although in your input statement tyou did not request a string), use the strcmp (link) function...

7 years ago | 0

| accepted

Load more