what is wrong with readmatrix()?

I'm using R2022a to finish my homework,but readmatrix() is not functioning properly
A=readmatrix('database.txt','Range','A1:D150');
The command runs right on the local runner,but once I run on my own Matlab R2022a ,it will say that "improper use of readmatrix,not enough input arguments":
choose"pause on errors"and the result:
However,a few weeks ago there is no mistake of readmatrix.I can't believe that I didn't change my code but the Matlab itself get something wrong.That's wierd.Files below are my all whole project so far.Can anyone help me?Thanks a lot!

7 comentarios

Matt J
Matt J el 20 de Mayo de 2023
Editada: Matt J el 20 de Mayo de 2023
As you can see from the Run output in your post, the command works fine and produces output. Something in the enviornment on your local machine must be interfering.
dpb
dpb el 20 de Mayo de 2023
As @Matt J says, it's got to be something you've done inadvertently--first, what does
which -all readmatrix
return? That would show any alias you may have created accidentally. If that appears normal, try a "clear all" and then execute the command from the command line and see if that fixes whatever it was...save any variables you need that were hard to generate to a .MAT file with SAVE first, of course.
After that, we'd have to see the full error message in context of the code that was run to have any chance of finding something; standing alone the function will execute normally for anybody here just trying it.
宇昊 彭
宇昊 彭 el 20 de Mayo de 2023
>> which -all readmatrix
D:\Matlab\toolbox\matlab\iofun\readmatrix.m
D:\Matlab\toolbox\shared\io\general\+matlab\+io\@ImportOptions\ImportOptions.m % matlab.io.ImportOptions method
Could you please tell me whether it is normal or not?
宇昊 彭
宇昊 彭 el 20 de Mayo de 2023
And "clear all" did nothing.I even tried to uninstall Matlab and reinstall Matlab R2022.All of the mentioned above are in vain.
Image Analyst
Image Analyst el 21 de Mayo de 2023
Editada: Image Analyst el 21 de Mayo de 2023
If you have any more questions, then
attach your code with the paperclip icon
after you read this:
There is likely something you're doing in the rest of your code that is not shown in the one line snippet that you gave us.
Stephen23
Stephen23 el 21 de Mayo de 2023
Perhaps some other function you have created/saved is interfering:
宇昊 彭
宇昊 彭 el 21 de Mayo de 2023
Thanks a lot! I did not understand the question along with the answer.Just then I read carefully and I change the function name "mode" to "damage".The problem has been solved.Thanks a lot!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 20 de Mayo de 2023

Comentada:

el 21 de Mayo de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by