Why can't solve "limit((5x-3)/x,x,inf)"?

1 view (last 30 days)
The code was:
syms x
limit((5x-3)/x,x,inf)
And the problem was:
Error: File: Untitled2.m Row: 2 Column: 9
Should not be a MATLAB expression.

Accepted Answer

John D'Errico
John D'Errico on 2 Feb 2020
Edited: John D'Errico on 2 Feb 2020
It works for me. Well, as long as I understand how to multiply in MATLAB.
syms x
limit((5*x-3)/x,x,inf)
ans =
5
If you ignore the rules of MATLAB syntax, then expect random garbage as a result. Note the use of 5*x, whereas 5x is syntactically invalid.
  1 Comment
Xeon Yone
Xeon Yone on 2 Feb 2020
NO!!It can' be...
Well,of course it can.I'll keep it in mind.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!