Solve function doesn't run

5 ビュー (過去 30 日間)
José Lindoro Fonseca Fierro
José Lindoro Fonseca Fierro 2018 年 10 月 21 日
コメント済み: madhan ravi 2018 年 10 月 21 日
I am working on Matlab 2017b and I am stuck on the problem of solving numerically an equation. I've followed the instructions but I can't find what is wrong. Here is my code:
syms x
solve(x^5 - 1 == 0, x)
Attempt to execute SCRIPT solve as a function:
C:\Users\jose-\Documents\MATLAB\solve.m
Error in equationsolver (line 2) solve(x^5 - 1 == 0, x)
I think that the code is not wrong, but the configuration of my software could, because the code is the same as the written one in the Matlab page.

採用された回答

madhan ravi
madhan ravi 2018 年 10 月 21 日
編集済み: madhan ravi 2018 年 10 月 21 日
you have a file name called as solve.m please delete it , contradicts with the matlab's inbuilt function solve
Type
which
in command window
also you can use the following solver
syms x
vpasolve(x^5 - 1 == 0, x)
location is shown C:\Users\jose-\Documents\MATLAB\solve.m just rename solve.m to solve1.m to avoid this error
  7 件のコメント
José Lindoro Fonseca Fierro
José Lindoro Fonseca Fierro 2018 年 10 月 21 日
Problem resolved. Thanks
madhan ravi
madhan ravi 2018 年 10 月 21 日
you’re welcome

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by