Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
having problem in running "convertSpreadsheetDates" on my Mac OS.

Subject: having problem in running "convertSpreadsheetDates" on my Mac OS.

From: Solomon

Date: 18 Nov, 2013 00:27:08

Message: 1 of 1

I am having problem in running "convertSpreadsheetDates" on my Mac OS.

Any suggestions how can I handle this, I am on MATLAB Version: (R2013b) on Mac OS.

Following is the code :

%% Import deal data from the input spreadsheet
% Import the data, extracting spreadsheet dates in MATLAB datenum format
[~, ~, raw, dateNums] = xlsread('input.xls','Deals','','',@convertSpreadsheetDates);
raw = raw(2:end,:);
dateNums = dateNums(2:end,:);
% Replace date strings by MATLAB datenums
R = ~cellfun(@isequalwithequalnans,dateNums,raw) & cellfun('isclass',raw,'char'); % Find Excel dates
raw(R) = dateNums(R);
% Create output variable
data = cell2mat(raw);
% Allocate imported array to column variable names
Deal = data(:,1);
Position = data(:,2);
Strike = data(:,3);
Maturity = data(:,4);
% Clear temporary variables
clearvars data raw dateNums R columnIndices;

Any help on this is appreciated.

Many Thanks,

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us