How to write a script for the following

hi everyone, i was just introduced to MatLab and want to how to write a script for the question bellow
A certain mechanical system has the process function f(x)=5t^4-4^t-t^2-t+5. Write a MATLab script that will be able to evaluate the state of the system at the point t=3

3 Kommentare

Walter Roberson
Walter Roberson am 14 Mär. 2022
hint: matlab has no implied multiplication. 3y would be written 3*y
Image Analyst
Image Analyst am 15 Mär. 2022
Your function f takes an input of x but the definition of f does not involve x at all, just t and some scalars. Why does it say x???
Jan
Jan am 15 Mär. 2022
Or with other words: define it as f(t).
Search for "anonymous functions" in the documentations. The command docsearch will be useful.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 14 Mär. 2022

Beantwortet:

am 30 Apr. 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by