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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:31:53+00:00 2026-06-03T21:31:53+00:00

In MATLAB, I have data which looks like this: 5 7 1 5 8

  • 0

In MATLAB, I have data which looks like this:

    5 7 1 
    5 8 2 
    5 9 3 
    6 7 3 
    6 8 3 
    6 9 2 

where each column is an array (e.g. x = [5; 5; 5; 6; 6; 6]).
I want the data to be put in matrix form in the following manner:

        7    8    9
    5   1    2    3
    6   3    3    2

Any suggestions?

  • 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-03T21:31:54+00:00Added an answer on June 3, 2026 at 9:31 pm

    Is this what you need?

    >> x =[5 7 1
           5 8 2
           5 9 3
           6 7 3
           6 8 3
           6 9 2];
    >> rowlabels = unique(x(:,1))
    rowlabels =
         5
         6
    >> collabels = unique(x(:,2))'
    collabels =
         7     8     9
    >> data = reshape(x(:,3),numel(collabels),numel(rowlabels))'
    data =
         1     2     3
         3     3     2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to have a MATLAB array fill a column with numbers in increments
I have some data generated in MATLAB that I want to process using Perl.
I have some measurement data which I want to plot. I plot only the
In Matlab 2011b, I have a multidimensional matrix which is to be initially presented
Possible Duplicate: Automatically plot different colored lines in MATLAB I have the following data
I have some data that I want to plot in MATLAB. The data consists
I have a 256x256 numpy-array of data which is constantly being changed. on every
Hi I have some data thats represented like this: 0,tcp,http,SF,239,486,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,8,8,0.00,0.00,0.00,0.00,1.00,0.00,0.00,19,19,1.00,0.00,0.05,0.00,0.00,0.00,0.00,0.00,normal. Its from the kdd
I have a Matlab program that is running longer than I'd like it to.
I have a matlab GUI....I'd like to load ANY file type(doc,txt,dat,xls) into matlab as

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.