Answered
I created two arrays and a matrix and I'm trying to use the 'surf' function to plot but its erroring.
Vectors need some sort of delimiters (spaces, commas, semicolons) to be defined correctly. x=[123456]; ...

5 years ago | 0

Answered
How to plot multiple functions on same figure using fplot?
The problem is that the polyfit call returned NaN for both parameters. I substituted a simple nonlinear power relation and used...

5 years ago | 0

| accepted

Answered
I am getting error
Use element-wise operations everywhere and it works — t=linspace(0,15); x=(3*t.^2-5).*(t.^3).*sind(t./2)-8*t+27; v=6*t-2.5*(...

5 years ago | 1

Answered
can fourier transform separate two signals/voices from audio file
Since there are not only a large number of overlapping frequencies and also no way to distinguishthem in time, it is unlikely th...

5 years ago | 0

Answered
What does @m and m(:) signify here?
Correctly stated ‘@(m)’ is a function handle (see What is a Function Handle? for details) and the ‘m(:)’ forces the argument ‘m’...

5 years ago | 1

Answered
curve fit a custom polynomial
One approach — syms A B C D r z sf = A*r^2 + B*z + C*r + D == 0 sfiso = isolate(sf, z) zfcn = matlabFunction(rhs(sfiso), '...

5 years ago | 0

| accepted

Answered
How to determine phase shift
Subtracting them is likely appropriate, however unwrapping them first will likely produce the correct result. T1 = readtabl...

5 years ago | 0

| accepted

Answered
I want to plot audio files in Vertically
See if the strips function will produce the desired result. .

5 years ago | 0

| accepted

Answered
Errorbar overlapping with the left and right border of a plot
Add an xlim (or axis) call — a = [1,2,3,4;5,6,7,8] figure errorbar(mean(a),std(a)) xlim(xlim+[-1 1]*0.2) ...

5 years ago | 0

| accepted

Answered
Timetable_finding each months average from 2000-2020 for all 11 states
See if the retime function will produce the desired result. .

5 years ago | 0

Answered
Evaluate for specific frequencies using freqs
Using an example from the freqs documentation — a = [1 0.4 1]; b = [0.2 0.3 1]; w = logspace(-1,1.3); h = freqs(b,a,w); ...

5 years ago | 0

Answered
Table calculating of one colomn based another columns value
If the desire is to have a table with the variables being the ‘TurbineID’, see if the unstack function will work. Analysing the...

5 years ago | 0

Answered
Find the max using PSO
This is at least the second time (the first that I°m aware of is how to get maximum value of this code) you’ve asked the same qu...

5 years ago | 0

| accepted

Answered
What do I need to fix in this code to get the maximum value?
This is at least the second time (the first that I°m aware of is how to get maximum value of this code) you’ve asked the same qu...

5 years ago | 0

| accepted

Answered
how to get maximum value of this code
Important parts of the code appear to be missing. However to get the maximum, negate the function — f = @(x) sin(x); x0...

5 years ago | 0

| accepted

Answered
how to apply pso to formula
The parameters have to be elements of a vector (and the appropriate operators must be provided, in this instance multiplication)...

5 years ago | 0

| accepted

Answered
how can i extract the last two digits of a big number e.g 2454152
One approach — number = 2454152; Out = rem(number,100) .

5 years ago | 1

Answered
Calculation of rise time of skin conductance data
The data are certainly available, however making sense out of them is difficult. Is there a time vector? The risetime func...

5 years ago | 1

| accepted

Answered
Check for coordinate pairs matches in .mat file
If I understand the problem correctly, the ismember function may be appropriate — List = randi(9, 10, 2) toMatch = randi(9, 1...

5 years ago | 1

| accepted

Answered
Why isnt plot working for this code?
It will work with the for loop if (1) the plot call plots points instead of lines, or (2) if the values are subscripted inside t...

5 years ago | 0

Answered
Approximating sharp changing time dependent term for use with ODE solver
The documentation secion on ODE with Time-Dependent Terms uses interp1 that also has a number of different methods to do the int...

5 years ago | 0

Answered
Solve equation with multiple values for V
Another approach — Vr = 12; Vi = 3; Pr = 5000; syms n V = [3;3.5;4;4.51;5;5.5;6;6.5;7;7.5;8.01;8.5;9;9.5;10;10.49;10...

5 years ago | 0

| accepted

Answered
How to extract data with multiple headerlines locations, with a differing number of headerlines per file?
My apologies, however this has to be the most inelegant code I ever wrote. It has the virtue of being able to read the posted...

5 years ago | 1

Answered
How can i replace a string to a numeric value in a specific column of an array ?
I am not certain if ‘string’ refers to character vectors or string variables. Try this — column = ['M';'B';'M';'M';'B';'B']...

5 years ago | 0

Answered
Finding the turning point on the left side of a peak
‘... the turning point on either side of the major peak’ Those are referred to as the Q and S deflections (or waves). Th...

5 years ago | 0

| accepted

Answered
Help. Plot graph calculation
A somewhat more analytic representation — x = linspace(-1, 3, 250); y = (x).*((x >= 0) & (x < 1)) + (2-x).*((x >= 1) & (x < 2...

5 years ago | 0

Answered
Solving for angle (Beta) using vpasolve
That’s the result I get when I solve it (and then correct it by ) — M1 = 3; P1 = 1; theta2 = 5; thetha3 = 20; gamma = 1....

5 years ago | 0

| accepted

Answered
extract especific rows from matrix
One option — c = [202002041000 25 202002041015 35 202002041030 54 202002041045 ...

5 years ago | 0

| accepted

Answered
How can I get a time versus amplitude graph from the waveform.
The spectrogram function returns amplitude (the ‘z’ axis of the rotated surf plot) in units of dB/Hz, so it will not produce the...

5 years ago | 1

| accepted

Answered
Issue with Quiver plot
I have absolutely no idea what the desired result actually is. One option: negate ‘x2’ Another option: set(gca, 'XDir','r...

5 years ago | 0

| accepted

Load more