Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
new to matlab, don't know how to use file

Subject: new to matlab, don't know how to use file

From: Jon Iversen

Date: 12 May, 2008 16:36:48

Message: 1 of 3

Hi everyone. I hope someone out there can answer me on how to use this file.

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7214

The file calculates excactly what I need, but I have never used matlab before today and can't figure out how to input the values I have.

I guess it's asking for the transfer function.
ex of TF:
G(s)= 25 / ( s^2 + 2s + 8)

I know this is just me beeing new to it but I can't make it load the file much less execute it or input my values.

Thanks to anybody that can give some simple answers.

Subject: new to matlab, don't know how to use file

From: Bookie via MathKB.com

Date: 12 May, 2008 16:54:56

Message: 2 of 3

Hi Jon,

  No problem. You need to save the file in the same directory (folder) as
the m.file you are calling the function from.

If you open that m.file you will see at the start and at the end of the
funtion the following:

function [T,Ta] = TwinTenStaticTension(Kt,Kt1,Kt2,D3,D5,X3,Y3,X5,Y5) %written
before code

[function code]

end % written after code

This tells Matlab that this m.file is a function that can be called by other
programs you write. Then you can close this file and return to your m.file.
In your own m.file, use the following format to call the function (assuming
these are all scalars):

[OS,Ts,Tr]=STEPSPECS(T,Y,Yss,Sp) %input your data in place of T, Y, Yss & Sp

As described in your link, in order for this funtion to calculate OS, Ts, &
Tr you must input T, T, Yss & Sp. This function allows you to omit Yss and
Sp and will use the values described in your link for these variables instead.
Then to see your outputs, write in your own m. file:

[OS,Ts,Tr] %WITHOUT semicolon

And you should see their outputs.

Hope that helps!

Bookie

Jon Iversen wrote:
>Hi everyone. I hope someone out there can answer me on how to use this file.
>
>http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7214
>
>The file calculates excactly what I need, but I have never used matlab before today and can't figure out how to input the values I have.
>
>I guess it's asking for the transfer function.
>ex of TF:
>G(s)= 25 / ( s^2 + 2s + 8)
>
>I know this is just me beeing new to it but I can't make it load the file much less execute it or input my values.
>
>Thanks to anybody that can give some simple answers.

--
Message posted via MathKB.com
http://www.mathkb.com/Uwe/Forums.aspx/matlab/200805/1

Subject: new to matlab, don't know how to use file

From: Jon Iversen

Date: 12 May, 2008 17:57:26

Message: 3 of 3

thank you,
that helped with some of it. I understand now how to call the function, and the file is stored in the proper place.
but still I don't get the function to work because I don't have or know what t it's asking for.

When I do it by hand I don't use any spesific t. And to find the rise time by hand I use a chart /list of values.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us