I am trying to use imshow to take data in a .txt file and print out the image made from the data.

5 views (last 30 days)
ssmith
ssmith on 26 Oct 2021
Edited: ssmith on 27 Oct 2021
So far my code looks like this
a = dlmread('data.txt');
imshow(a);
But when I go to run the code I get an error saying "Error using abs too many input arguments." The .txt file has a ton of data points inside it and I made sure to save the .txt file in the same folder as my code so I am not sure why it is not able to read my data.

Accepted Answer

DGM
DGM on 26 Oct 2021
Edited: DGM on 26 Oct 2021
I'm going to guess that this is the same homework assignment. If not, similar operations should apply. The example only shows how to rectify the image from the vectorized positional and intensity information. You'll have to figure out how to read the data from the file into the corresponding vectors and deal with the output scaling/casting as mentioned.
  10 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!