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 Comments

Matt J
Matt J on 20 May 2023
Edited: Matt J on 20 May 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.
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.
>> 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?
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 on 21 May 2023
Edited: Image Analyst on 21 May 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.
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!

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2022a

Asked:

on 20 May 2023

Commented:

on 21 May 2023

Community Treasure Hunt

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

Start Hunting!