Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:27:33+00:00 2026-06-12T14:27:33+00:00

I have a matrix where the first column contains dates and the first row

  • 0

I have a matrix where the first column contains dates and the first row contains maturities which are alpha/numeric (e.g. 16year).

The rest of the cells contain the rates for each day, which are double precision numbers.

Now I believe xlsread() can only handle numeric data so I think I will need something else or a combination of functions?

I would like to be able to read the table from excel into MATLAB as one array or perhaps a struct() so that I can keep all the data together.

The other problem is that some of the rates are given as ‘#N/A’. I want the cells where these values are stored to be kept but would like to change the value to blank=" ".
What is the best way to do this? Can it be done as part of the input process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:27:34+00:00Added an answer on June 12, 2026 at 2:27 pm

    Well, from looking at matlab reference for xlsread you can use the format

    [num,txt,raw] = xlsread(FILENAME)
    

    and then you will have in num a matrix of your data, in txt the unreadable data, i.e. your text headers, and in raw you will have all of your data unprocessed. (including the text headers).

    So I guess you could use the raw array, or a combination of the num and txt.

    For your other problem, if your rates are ‘pulled’ from some other source, you can use

    =IFERROR(RATE DATA,"")
    

    and then there will be a blank instead of the error code #N\A.

    Another solution (only for Windows) would be to use xlsread() format which allows running a function on your imported data,

    [num,txt,raw,custom] = xlsread(filename,sheet,xlRange,'',functionHandler)
    

    and let the function replace the NaN values with blank spots. (and you will have your output in the custom array)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel spreadsheet that has dates in the first column, the rest
I have a large matrix mdat (1000 rows and 16 columns) contains first column
I have two arrays which contain times. The first is the state of a
I have a dataframe. first column contains my the predictive score (range from 0
I have a bit of confusion regarding the matrix row/column order of the CATransform3D
Let's say I have a matrix x which contains 10 rows and 2 columns.
I have a matrix A which I want to convert into a data.frame of
I have a matrix of objects that contains data in this form: name A,2,name
I have a data frame with 22239 rows & 200 columns. The first column
I have a m x n matrix where each row consists of zeros and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.