I programmed this:
%plot envelope of a signal
%________________________________
%load('y-data')
load('ungedaempft.mat','t','s');
envelope(ungedaempft.s,17,'peak');
datatypes (all imported in workspace):
.mat file: 400x2 table
variables s
and t
: 400x1 double (imported as column vector in workspace)
t
= x-axis value
s
= y-axis value
that's how the .mat 400x2 table looks like
How can I find out the function for the envelope in the sense of getting envelope(t)= ... in the command window?
I tried the command
"yupper =" and "ylower ="
in the command window to get the function Upper and lower signal envelopes as vectors/matrices≠functions, but it didn't work even if I change my initial code to
%load('y-data')
load('ungedaempft.mat','t','s');
[yupper,ylower] = envelope(ungedaempft.s,17,'peak');
even if I use the command "supper ="
because y=s, no vector/matrix is returned. Would be very grateful for further help!
I get the errors:
Warning: Variable 't' not found.
> In newenvelope (line 5)
Warning: Variable 's' not found.
> In newenvelope (line 5) Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Error in newenvelope (line 9) [yupper,ylower] = envelope(ungedaempft.s,17,'peak');
& when I type the command to extract the function of the upper envelope, I receive the following error:
yupper = ↑ Error: Invalid expression. Check for missing or extra characters.
& couldn't find anything in the documentation, so I don't know how to proceed would be happy for your help!