'mtimes' error and how to fix it

5 views (last 30 days)
Mikaell
Mikaell on 31 Dec 2013
Edited: Walter Roberson on 31 Dec 2013
I am writing code and this error keeps popping up and I am not sure how to fix Untitled5
v = importfile('v.TXT', 1, 3409);
deltaL=v(:,2);
F=v(:,3)*1000;
Undefined function 'mtimes' for input arguments of type 'dataset'.
How do I fix it? Thanks

Answers (4)

Walter Roberson
Walter Roberson on 31 Dec 2013
You could try
F = v(:,3) .* 1000;
but please tell us what
which -all importfile
indicates. The versions of importfile() that I am finding do not return any value.
Are you possibly wanting importdata() instead of importfile() ?
  2 Comments
Sean de Wolski
Sean de Wolski on 31 Dec 2013
importfile is the default name for a function that is automatically generated from the Import Tool.
Image Analyst
Image Analyst on 31 Dec 2013
Mikaell's "Answer" moved here since it's not an answer to his original question.
It doesn´t work. You have a true.. I want importdata(), but whe i try it: com.mathworks.jmi.MatlabException: Too many output arguments.

Sign in to comment.


Mikaell
Mikaell on 31 Dec 2013
Edited: Walter Roberson on 31 Dec 2013

Sean de Wolski
Sean de Wolski on 31 Dec 2013
v appears to be a dataset. If you want to multiply one of the variables in this dataset with another, you'll need to extract it.
If the variable has a name, you could use dataset.variable_name to extract it. So for the documentation example:
hospital.AtRisk * pi

Matt J
Matt J on 31 Dec 2013
F=double(v(:,3))*1000

Categories

Find more on Parallel for-Loops (parfor) in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!