필터 지우기
필터 지우기

linprog example returns empty vector (when it should return 0.6667 1.3333)

조회 수: 1 (최근 30일)
Hao Sun
Hao Sun 2020년 2월 28일
편집: Stephen23 2020년 2월 29일
just gives me x =[] what gives I should be getting
Optimal solution found.
x = 2×1
0.6667
1.3333
  댓글 수: 3
John D'Errico
John D'Errico 2020년 2월 28일
How to get rid of it? Um, you created a file with that name, then saved it on your search path. Don't do that?
It is legal to delete or rename a file that you created.
In general, it is a bad idea to create files with the same name as MATLAB functions that you will later be using. Else, you will have this exact problem.
Hao Sun
Hao Sun 2020년 2월 29일
I don't think I created that file I think it just got installed when I installed certain matlab packages or something. Btw if I cannot delete the file directly ( I don't have administrative access I use matlab on campus as a student) what can I do? Also what can I do to prevent overriding these defaults when installing packages?

댓글을 달려면 로그인하십시오.

답변 (1개)

Stephen23
Stephen23 2020년 2월 29일
편집: Stephen23 2020년 2월 29일
"...I think it just got installed when I installed certain matlab packages or something."
It looks like some badly-written third-party toolboxes are shadowing the inbuilt function name/s.
" Also what can I do to prevent overriding these defaults when installing packages?"
You could:
  • delete those toolboxes (but usually users want to keep toolboxes), or
  • rename those functions (this might not be a trivial task), or
  • change the path order so that inbuilt toolboxes have a higher priority (but this could break functionality of those badly-written third-party toolboxes), or
  • remove those toolboxes from the Search Path:
For example, you could use restoredefaultpath to reset back to the default Search Path:

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by