Probably a simple Maple syntax error(hopefully). Help?

  • Thread starter mxotoni
  • Start date
  • Tags
    Maple
In summary, the person is having trouble with a Maple syntax error while trying to graph a function in a research project. They have tried it on different computers and changed the values, but are still getting an error message. They suspect it may be a simple error and are seeking help. They also mention that they have checked the Maple site for troubleshooting, but it did not resolve their issue.
  • #1
mxotoni
4
0
Probably a simple Maple syntax error(hopefully). Help? :)

1. I'm working on a research project. I've used this exact syntax below before and it worked on maple. I tried it a couple weeks later on the same computer in the math lab, and it didn't work. Then I tried it on my laptop- I think it is just a syntax- maybe someone can help me without knowing the theory behind the work.

Anyways, here's what I type into maple (tell me if you need the maple output)

c:=0.0012;
s:=-1.5;
m:=-2.8
f3:=1+s+c*[1+(1/(x^2))-(1/((1-x)^2))]-2*m*x;


(At this point everything is fine; the function is defined and the only unknown in the function is x)

Then, it's time for me to graph so f3 vs x, so this is what I type:

plot(f3,x=0..0.69);

I thought maybe the problem was the division by 0 (even though it should just give me an asymptote), I changed it to

plot(f3,x=0.1..0.69);


No luck even with this. The error I get is

"Warning, unable to evaluate the function to numeric values in the region;see the plotting command's help page to ensure the calling sequence is correct."


I'm frustrated because I got this to graph before with x=0..0.69. I know this graph is located in the first quadrant. I really hope it's a simple error. Any hints or suggestions or anything would be appreciated. I went to the maple site to troubleshoot, and it doesn't seem to me like I have the errors they listed.
 
Physics news on Phys.org
  • #2
Just in case anyone was wondering, the issue was that I used brackets instead of parentheses. Maybe Maple thought it was a matrix!
 

Related to Probably a simple Maple syntax error(hopefully). Help?

1. What is Maple syntax error?

Maple syntax error refers to a mistake or error in the syntax or structure of a Maple code. This can happen due to missing or incorrect punctuation, incorrect use of functions or variables, or any other violation of the Maple programming language rules.

2. How can I identify a Maple syntax error?

You can identify a Maple syntax error by looking for any red exclamation marks or error messages in your code editor. These marks indicate that there is an error in your code and provide a brief description of the error. You can also use the "Syntax" option under the "Tools" menu in Maple to check for any syntax errors in your code.

3. How do I fix a Maple syntax error?

The first step to fixing a Maple syntax error is to carefully read the error message and try to understand what the issue is. You can then go back to your code and make the necessary corrections, such as adding missing punctuation, correcting function or variable names, or rearranging the code to follow the correct syntax. You can also refer to Maple's documentation or seek help from online forums or Maple experts.

4. Can I prevent Maple syntax errors?

While it is not possible to completely prevent Maple syntax errors, there are some steps you can take to reduce the chances of encountering them. These include properly organizing your code, using consistent naming conventions, and regularly checking for errors as you write your code. You can also use Maple's "Syntax" option to check your code for errors before running it.

5. Can a simple Maple syntax error affect the output of my code?

Yes, even a small syntax error in your Maple code can significantly affect the output or functionality of your code. This is because Maple follows specific rules and guidelines for its syntax, and any violation of these rules can change the intended behavior of your code. It is important to fix all syntax errors before running your code to ensure accurate results.

Similar threads

  • Introductory Physics Homework Help
Replies
13
Views
786
  • Introductory Physics Homework Help
Replies
8
Views
794
  • Calculus and Beyond Homework Help
Replies
5
Views
645
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
11
Views
800
Replies
6
Views
86
  • Introductory Physics Homework Help
Replies
28
Views
624
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
916
  • Introductory Physics Homework Help
Replies
10
Views
931
Back
Top