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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:55:57+00:00 2026-06-01T16:55:57+00:00

How to get the matlab’s output? NOT the whole output(I know diary can help)

  • 0

How to get the matlab’s output? NOT the whole output(I know diary can help)

A easy example:

>> st = rng
st = 
     Type: 'twister'
     Seed: 0
    State: [625x1 uint32]

what I want is to copy the output to clipboard. when I use clipboard function, the error occurs:

>> clipboard('copy', st)
Error using mat2str (line 54)
Input matrix must be numeric.
Error in clipboard (line 56)
        stuff = mat2str(stuff); 

Can I get the output strings to the clipboard easily instead of use mouse select…copy…

Thanks!

add:

Thanks,yuk! Copy the DISP representation is what I wanted.

but could I get something in the clipboard like this after I run the command toString1(rng):

   >> rng
   ans = 
       Type: 'twister'
       Seed: 11284109
      State: [625x1 uint32]
  • 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-01T16:55:58+00:00Added an answer on June 1, 2026 at 4:55 pm

    To copy a matrix to clipboard I’d recommend MAT2CLIP FileExchange submission. It supports not only strings or numeric matrices, but also mixed cell array, logical, etc.

    It does not support structures although. If you need to copy individual fields you can still use mat2clip. You can set a for-loop through structure fields and use pause to paste the fields from clipboard.

    If you are interested to copy the whole structure or its DISP representation check this SO question – How to get result of DISP as return parameter into a variable?

    One solution from this question is to get DISP output to a string, which you can copy to clipboard with mat2clip (universal for any object with display method):

    toString = @(x) evalc('disp(x)');
    mystring = toString(mystruct);
    

    Another answer recommends STRUCT2STR from FileExchange. Check also STRUCT2STR recursive.

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

Sidebar

Related Questions

Does anyone know how to get a specific type of file from matlab from
I'm creating a matlab GUI using GUIDE. I can't get the context menus to
I am trying to get this in MATLAB, however I am not successful !
In MatLab, > help bi2de provides the following example: B = [0 0 1
I want to how know to get certain numbers from a string in matlab.
I see in the MATLAB help ( matlab -h ) that I can use
I'm wondering how in MATLAB you can get a reference to a Java enum
In Matlab, how can i get a String containing GRUMPY given the following declaration:
In Matlab, by the function min(), I can only get one single minimum element
How can I get a neural net file from Matlab into a FANN .net

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.