Does anyone know why this doesn't answer the problem? When worked out in matlab it works just fine.
1. do not use "input(...)", "n" is defined variable and input doesn't return anything. 2. "=" is used for assignments, not for comparisions. This one returns syntax error in line 3 (if ...), use "==" instead. 3. Output should be logical, not string. Use "false" instead of "'false'" etc. 4. Return the output via variable specified for it in first line of the function, in this case it is "tf". Do not use "fprintf" for that. 5. Read The Friendly Manual. Just type "doc" in Command Window - there are tons of documentation, tutorials.
L 3 (C 15): SYNER: Parse error at '=': usage might be invalid MATLAB syntax.
Remove all the words that end with "ain"
Output any real number that is neither positive nor negative
Area of an Isoceles Triangle
Area of a circle
MATLAB Basic: rounding
Clean the List of Names
Sums with Excluded Digits
Remove any row in which a NaN appears
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office