• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Any MATLAB junkies out there?

Status
Not open for further replies.

polarmystery

Diamond Member
Need help coding a plot of a transfer function (1-e^(-s*h)) / h. Feel free to post or PM me! :whiste: :'( D: :colbert: 😛

h = constant.

Edit: changed the constant cause I'm retarded
 
Last edited:
Is this the kind of output you looking for? This is for t=10.

bode.PNG


EDIT: Also.. wtf would you use a constant and label it as 't'?
 
Last edited:
Is this the kind of output you looking for? This is for t=10.

bode.PNG


EDIT: Also.. wtf would you use a constant and label it as 't'?

LOL yeah I know sorry about the constant name. It was just the first thing that came to my mind. I don't know if that's what I'm looking for honestly (plot wise). It looks like it could be though as the function in question is supposed to reduce the magnitude of a transfer function. The function is getting multiplied by another transfer function and I'm taking the step response of it.
 
That looks like what I would have expected it to. The s being complex causes it to oscillate like that.
It appearing to reduce(actually increasing due to being negative dB), with h constant, is simply because of aliasing.
Any spike downwards actually goes to -∞ dB.
 
Last edited:
That looks like what I would have expected it to. The s being complex causes it to oscillate like that.
It appearing to reduce(actually increasing due to being negative dB), with h constant, is simply because of aliasing.
Any spike downwards actually goes to -∞ dB.

explain this.
 
The pixels, or data points, are finite in size, there is a maximum amount detail that can be displayed.
The graph actually shows a periodic function with a set period of 2pi/10, which is why they seem to get closer.
 
Last edited:
Geez I suck with my clarification. Sorry yeah unit step. (Actually it's supposed to go with a ramp, but I'd just like to get it working)

h=?

for i=1:100
if i<h
f(i)=1/h;
end
if i>=h
f(i)=1/h-1/h;
end
t(i)=i
end

plot(t,f)

Seems really strange that you would have to graph that but that's what I have it worked out to be lol. Its just the formula for the Unit rectangular pulse with

h/s(1-exp(h*-s))=F(s)

I'm assuming you are asked to graph it in the time domain.
 
Last edited:
Status
Not open for further replies.
Back
Top