Answered
Trying to create a cleaner code
Using 4 (rather than 400): T = 42; ii = (1:4).'; % Note: Transpose t = lin...

6 years ago | 0

| accepted

Answered
How to subset data based on time range
I am not certain what result you want. This computes all values of ‘t.data’ that are within 18 hours of a particular row valu...

6 years ago | 0

| accepted

Answered
Time and Frequency analysis
The peaks in the fft result can occur anywhere in the signal. To do a time-frequency analysis, use the spectrogram function.

6 years ago | 0

| accepted

Answered
How can I apply a stepped input to a transfer function in MatLab?
What is a ‘stepped’ input? Is it something similar to the stairs plot function? If so, experiment with this: steps = repel...

6 years ago | 0

Answered
Using fft with rectangularPulse
It is now: f=@(t) rectangularPulse(-1,1,t); time=-6:0.01:6; Fs = 1/0.01; Fn = Fs/2; Freq = linspace(-Fn, Fn, numel(time));...

6 years ago | 0

| accepted

Answered
pzmap vs pzplot vs zplane?
The pzmap and pzplot funcitons are part of the Control System Toolbox (and associated Toolboxes), with pzplot being an extended ...

6 years ago | 0

| accepted

Answered
How to find input from output?
One approach: fabc = f(a,b,c); % Value Of Function Evaluated With All Arguments find_c...

6 years ago | 0

| accepted

Answered
ilaplace not processing, even with use of partfrac.
Thje ilaplace funciton is working correctly. The ‘A(s)’ and ‘B(s)’ functions (without any other definitions) are placeholders. ...

6 years ago | 0

Answered
Is my sound() working properly?
From, the documentation: sound(y) sends audio signal y to the speaker at the default sample rate of 8192 hertz. So the d...

6 years ago | 1

| accepted

Answered
Scale data on a plot by opacity?
See Vary Circle Color in the scatter documentation.

6 years ago | 0

| accepted

Answered
How do I write this correctly?
Use element-wise operations as cescribed in Array vs. Matrix Operations, and create appropriate matrices from your x and y vecto...

6 years ago | 1

| accepted

Answered
How can I get the top and bottom envelopes of a signal?
If you have R2015b or later, use the envelope function. Otherwise, see the hilbert funciton (linked to at the end of that page)...

6 years ago | 0

Answered
Separating data from a CSV file
It woiuld be necessary to convert column B to strings in order for datetime to parse it, however that is not difficult. Groupin...

6 years ago | 0

| accepted

Answered
Error getting Fourier transform of a 1d signal
The easiest way to determine the location of the peaks is to use the findpeaks function (with the appropriate name-value pairs t...

6 years ago | 0

| accepted

Answered
how to isolate y from f(x) = g(x, y) piecewise equation or function?
First, please copy your code from the Editor and paste it here, then use the Code button to format it. (My version of MATLAB ca...

6 years ago | 0

| accepted

Answered
Peak Value from bodemag plot
Try this: F = openfig('untitled.fig'); getF = get(F); Lines = findobj(F, 'Type','Line'); for k = 1:numel(Lines) X{k}...

6 years ago | 0

| accepted

Answered
Control over proportions using randi (or something else )
I am not certain what you want to do. One (relatively simple) approach: a = 10; b = 20; R = randi(10, a, b); R(R <= 7) ...

6 years ago | 1

| accepted

Answered
Integral keeps showing wrong answer
It appears to be correct, simply simplified: syms x f = (8*x-4)/(4*x^2-4*x+5); fint = int(f) dfint = diff(fint) figure ...

6 years ago | 0

| accepted

Answered
troubles with trapz function
We likely took the same approach. There are several ways to access the data in table objects, as described in the documentation...

6 years ago | 2

| accepted

Answered
Connecting 2D ellipses in a 3D plot to make a 3D 'tunnel'
I am not certain what you want. Try this: F = openfig('Mean throw with 1SD error band.fig'); Ax = findobj(F,'Type','Axes')...

6 years ago | 1

| accepted

Answered
Filling the area between two open ended curves
Try this: p = load('L_D copy.txt'); x = p(:,1); y1 = p(:,2); y2 = p(:,3); figure plot(x, y1, x, y2) hold on fill_...

6 years ago | 0

| accepted

Answered
how to import excel data as separate column vectors?
The available functions inport Excel files as matrices (that are of course collections of column vectors) are readmatrix and xls...

6 years ago | 0

| accepted

Answered
Symbolic Math Toolbox for solving algebraic equations
The earlier Symbolic Math Toolbox versions used Maple as the engine, those after R2010a (if I remember correctl;y) use MuPAD. ...

6 years ago | 0

| accepted

Answered
using fminsearch in a for loop
I am not certain what you want to do. Try this: q = [0.96 0.993 0.994 0.998 0.999]; n = 0.7448; v = [0:100000]; phatK0...

6 years ago | 0

| accepted

Answered
How to save for loop values?
Try this: f=zeros(2,M); for i=1:M f(:,i)=[fd+((1+m(i)*r)/2)*f_delta; fd-((1+m(i)*r)/2)*f_delta]; end That saves them a...

6 years ago | 1

| accepted

Answered
Values instead of functions
Do element-wise division as well: y=sin(3*r).^2./sin(r).^2; ↑ ← HERE That should do what you want.

6 years ago | 1

| accepted

Answered
Plotting selected columns of a matrix
I am not certain what you want as the result. Try this: M = rand(32,24) + (1:24); % Create Matrix x ...

6 years ago | 1

| accepted

Answered
fft of vector row
The fft function can calculate the Fourier transform across any dimensions you choose. I do not understand the notation in that...

6 years ago | 0

Answered
How to find the infelction points from the data
If you want to find the dicrotic notch in each arterial pulse wave, try this: D = load('data_1.mat'); y = D.column1; ...

6 years ago | 0

| accepted

Answered
ylabel Italic , Two fonts
Use ‘\it’ to begin the italic string and ‘\rm’ to reset to the normal display: ylabel('\itc44\rm(GPa)')

6 years ago | 0

| accepted

Load more