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 8794667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:16:58+00:00 2026-06-13T23:16:58+00:00

I met a problem here, I have a cell like below. Two vectors and

  • 0

I met a problem here, I have a cell like below. Two vectors and each row there is either a number or an acronym

'  33572'                                    '  AGCHIN'  
'  46058'                                    '  ABCHIN'  
'  Commercial Bank'                          '  48188'   
'  45913'                                    '  NINGBO'  
'  Commercial Bank'                          '  46701'   
'  Commercial Bank'                          '  30118'   
'  Commercial Bank'                          '  33076'   
'  Commercial Bank'                          '  46799'   
'  40749'                                    '  BITICLTD'
'  40440'                                    '  PARICHIN'
'  Commercial Bank'                          '  18925'   
'  16911'                                    '  CHANGSHA'
'  40220'                                    '  CHENGDU' 
'  32748'                                    '  CHISO'   
'  Commercial Bank'                          '  32378'   
'  48206'                                    '  CCBIAS'  
'  Non-banking Credit Institution'           '  23729'   
'  Specialised Governmental Credit Inst.'    '  43960'   
'  Commercial Bank'                          '  38203'   
'  38600'                                    '  CHMBIAS' 
'  45809'                                    '  MINSHENG'
'  23601'                                    '  PINGANTI'
'  Commercial Bank'                          '  42330'   
'  45550'                                    '  CHINESE' 
'  49481'                                    '  CHONGS'  
'  Investment Bank/Securities House'         '  32365'   
'  23602'                                    '  CITITI'  
'  39611'                                    '  LUOYANG' 
'  19950'                                    '  DALICITY'
'  23603'                                    '  DAILIANH'
'  17360'                                    '  DONGGUAN'
'  23604'                                    '  DONGGUTI'
'  39612'                                    '  DONGYING'
'  39060'                                    '  EVERGBC' 
'  42596'                                    '  EXPO'    
'  46703'                                    '  SINOBKU' 
'  34608'                                    '  FUJIAN'  
'  29182'                                    '  FUZHOU'  
'  35965'                                    '  GUANGDON'
'  29375'                                    '  GRCCOOP' 
'  29462'                                    '  GUOLIAN' 
'  29490'                                    '  HAITONG' 
'  18565'                                    '  HANGZIAS'
'  23730'                                    '  HANGZICT'
'  23758'                                    '  HARBIN'  
'  23420'                                    '  HEFEI'   
'  48411'                                    '  HETLONG' 
'  44174'                                    '  HUAX'    
'  Commercial Bank'                          '  29149'   
'  23421'                                    '  HUNAN'   

I want to extract numbers and put numbers into a single column, could anyone tell me how to do this? 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-13T23:16:59+00:00Added an answer on June 13, 2026 at 11:16 pm

    If I understand you correctly, you want to extract the numbers and put them into a single column. For that you’ll have to filter out the non-numbers.

    Cstr = cellfun(@str2num, {C{:}}, 'Uniform', 0); % # Convert strings to numbers
    Cnums = Cstr(cellfun(@(v)~isempty(v), Cstr));   % # Remove empty strings
    

    The empty cells are removed because str2num produces an empty vector when it operates on a string that contains non-digits characters.

    Now we have a cell array containing only numbers. To convert the cell array to a column vector, just do:

    nums = [Cnums{:}].'
    

    It should yield the following:

    nums =
    
           33572
           46058
           45913
           40749
           40440
           16911
           40220
           32748
           48206
           ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem. I have 3 tables like below: 1) met_ID (primair) etc.
Hi all: I met a problem like this. Here is the scenario: if I
I have met a problem with virtualbox, I hope someone could help me here,
I met strange problem. I have never work with Devise gem before. So, i
Following the guide here, I have created a full-screen WPF application. But I met
I have met an interesting problem while implementing the Observer pattern with C++ and
I met problem to align icons of different sizes with JRadioButtonMenuItem . Here's a
I have a problem. I have a table of support tickets (wh_task). Each task
Good day! I have met problem with synchronizing threads. I am writing program which
Here is the problem: Constants: 'a', 'b', 'c', 'd'; I have a lot of

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.