Unexpected MATLAB expression in MATLAB
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Samuel
am 12 Nov. 2015
Bearbeitet: Walter Roberson
am 13 Nov. 2015
Please, how can I fix that? Thank you.
I want to read an stl file 'Tibiaformatlab' into matlab
function [F, V, N] = read_stl_file('Tibiaformatlab.stl')
but it says "Unexpected MATLAB expression".
0 Kommentare
Akzeptierte Antwort
James Tursa
am 12 Nov. 2015
Bearbeitet: James Tursa
am 12 Nov. 2015
This line uses the function keyword, which means you are starting a function definition:
function [F, V, N] = read_stl_file('Tibiaformatlab.stl')
But for the argument to this function you use a string literal. If you really are starting a function definition, this needs to be a variable. E.g., using a variable named filename:
function [F, V, N] = read_stl_file(filename)
And then the code for the function would follow this line.
If you are trying to call this function with a particular string input, then this syntax:
[F, V, N] = read_stl_file('Tibiaformatlab.stl');
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!