Error: Unbalanced or unexpected parantheses
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Can someone please explain to me the problem with my function. All the variables have already been assigned.
function [u,w] = velocity(H,sigma(n),k,h(n),z,x)
n = 1:length(h)
h = [1 2 3 4]
0 Kommentare
Akzeptierte Antwort
Brian B
am 8 Feb. 2013
You cannot use indexing in the arguments listed in the function definition. Try instead:
function [u,w] = velocity(H,sigma,k,h,z,x)
...
You can then call the function, passing various elements of arrays as arguments:
[u,w] = velocity(H,sigma(n),k,h(n),z,x);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Special Characters finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!