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

  • Home
  • SEARCH
  • 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 8501971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:21:29+00:00 2026-06-11T01:21:29+00:00

Scenario: For signal processing analysis, I’m receiving data from somebody else. My standard practice

  • 0

Scenario:

For signal processing analysis, I’m receiving data from somebody else. My standard practice if I have several data files, each representing a chunk of time, is to name the data vector 'data' and the time vector 'time' and not individuate each variable name, since they are isolated by files. If I need to individuate them, I do it in the program that calls them.

However, I’ve recieved data from somebody who individuates them, so each variable is uniquely named, 'data10', 'data11'.

All my routines and programs call on 'data'. Is there a way to change these variable names from 'dataxx' to 'data' without using eval? My first thought was to try the assignin function, but it doesn’t accept wildcard arguments for the 'value' input. Each time I load a file separately in its own structure, so it will never be a problem to use a wild card, ther will always only be one file that starts with 'data...'

Thanks!

  • 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-11T01:21:30+00:00Added an answer on June 11, 2026 at 1:21 am

    If you’re loading these variables from a .mat-file, you can use the load command with an output:

    collectedData = load('dataVariables.mat');
    

    collectedData has a field for each variable contained in the .mat-file. If you now want to access the variable data10, you can use dynamic field names to access it:

    collectedData.(sprintf('data%i',10))
    

    It is worth noting that structfun can be quite useful if you want to apply a function to each field of a structure without looping across field names.

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

Sidebar

Related Questions

suppose we have the following scenario: 2 users both signal ready to play, the
I am trying to channel data via pipes whenever a signal arrives from a
Scenario : I'll try to put an analogy with the loan broker example from
Scenario: Every page on the website will have a menu bar at the top
Scenario 1: If I have a Great Grandpa ancestor (let's name him A); And
Scenario: Most smartphones have a high resolution camera that generates photos that may range
Scenario: I have configured SQOOP on my PC. But I am facing some problem
Scenario: I have a Question which has 2 radio buttons & two subforms: subformA
Here's the scenario: I have the following user control, the idea is that it's
I've recently faced a problem involving passing data (small amount), from a page to

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.