Im a begginer at Matlab and have a simple question.(adsbygoogle = window.adsbygoogle || []).push({});

I have a equation with lots of variables that can be easily entered incorrectly.

Therfore i was going to split up the term.

For example if i have y = x^(6Z+2) i was going to put the m file as

y=x^u

u = 6Z + 2

then z = 3 for example.

but i tried something like this and it didnt work, could anyone help me.

function z = f(c)

z = c^h

h=2;

this is what i tried

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Simple Matlab

**Physics Forums | Science Articles, Homework Help, Discussion**