Why do I get the error "Unrecognized function or variable"?
Mostra commenti meno recenti
I have the error "Unrecognized function or variable 'HW1'." in the following code:
close all
clear all
%Question 2
dataStringArray = readtable('bank.csv');
%Question3
dataTable = readtable('bank.csv');
%Question4
age = dataTable.age(155);
education = dataTable.education{155};
%Question5
dataNumericMatrix = readmatrix('bank.csv');
%Question 6
dataCellArray = readcell('bank.csv');
%Question 7
elementRow100Col4 = dataNumericMatrix(100, 4);
allElementsRow250 = dataCellArray(250, :);
The bank.csv document is in the same file than my code. My code is saved under the name "HW1.m". I don't understand why I keep having this error message in my code. If someone could help it would be nice.
Risposte (1)
Star Strider
il 21 Gen 2024
0 voti
The important information is likely not shown here. My guess is that you are referring to ‘HW1’ somewhere else (perhaps in another script), and that is throwing the error. It might be necessary for you to replace the isolated reference to ‘HW1’ with:
run('HW1')
or:
run('HW1.m')
.
Categorie
Scopri di più su Standard File Formats in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!