Code covered by the BSD License  

Highlights from
Introduction to MATLAB® Webinar materials

Introduction to MATLAB® Webinar materials

by

 

20 Mar 2007 (Updated )

Presentation and demo materials from the live Webinar "Introduction to MATLAB®" (March 20, 2007)

myimportfile(fileToRead1)
function rawData1 = myimportfile(fileToRead1)
%IMPORTFILE(FILETOREAD1)
%  Imports data from the specified file
%  FILETOREAD1:  file to read

% Copyright 2007 The MathWorks, Inc.

%  Auto-generated by MATLAB on 20-Aug-2006 20:13:01

% Import the file
rawData1 = importdata(fileToRead1);

% For some simple files (such as a CSV or JPEG files), IMPORTDATA might
% return a simple array.  If so, generate a structure so that the output
% matches that from the Import Wizard.
% [unused,name] = fileparts(fileToRead1); %#ok
% newData1.(genvarname(name)) = rawData1;

% Create new variables in the base workspace from those fields.
% vars = fieldnames(newData1);
% for i = 1:length(vars)
%   assignin('caller', vars{i}, newData1.(vars{i}));
% end

Contact us