Getting "Execution of script roots as a function is not supported:" error
显示 更早的评论
Hi,
I am trying to find the roots of an equation x = x^3 + 4*x^2 - 8* x -12
Below is my script:
x = [1,4,-8,-12];
y = roots(x)
I have saved this code in flie_3.m script and numming it and its giving me error as
"Execution of script roots as a function is not supported:"
采纳的回答
更多回答(1 个)
McYvans Frank
2023-2-26
编辑:McYvans Frank
2023-2-27
0 个投票
"Execution of script <psat> as a function is not supported: C:\Program Files\Polyspace\R2021a\toolbox\psat\settings.m"
For my case, I was adding psat library to Matlab.
Upon following this tutorial https://youtu.be/wqBHO2kzKB0, I realized person installed the library to a latter version 2016. So libraries are compatible to versions. Here's how I did to make mine work with 2021: -Downloaded and extracted PSAT 2.1.11 -Instead of following the path from video, kept the extracted PSAT folder in "picture" folder in desktop. I did drop in the toolbox folder and still got the same error, reason why I changed folder. -Follow same procedure to set path and everything -Created a new file and saved successfully.
2 个评论
Walter Roberson
2023-2-26
What shows up for
which -all psat
McYvans Frank
2023-2-27
编辑:McYvans Frank
2023-2-28
The command gives the direction of storage of the psat library.
C:\Users\McYvans\Pictures\psat\psat.m
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!