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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:30:50+00:00 2026-05-17T22:30:50+00:00

Could you please help me for this matter? I have 3 matrices, P (Power),

  • 0

Could you please help me for this matter?

I have 3 matrices, P (Power), T (Temperature) and H (Humidity)

every matrix has 31 columns (days) and there are 24 rows for every column

which are the data for the March of year 2000, i.e.

for example, the matrix P has 31 columns where every column represents

a day data for Power through 24 hours and the same idea is for T and H

I tried to write a MATLAB program that accomplish my goal but

It gave me errors.

My aim is:

In the MATLAB command window, the program should ask the user the following phrase:

Please enter the day number of March, 2000 from 1 to 31:

And I know it is as follows:

Name=input (Please enter the day number of March, 2000 from 1 to 31:)

Then, when, for example, number 5 is entered, the result shown is a matrix containing the following:

1st column: The day name or it can be represented by numbers

2nd column: simple numbers from 1 to 24 representing the hours for that day

3rd column: the 24 points of P of that day extracted from the original P
(the column number 5 of the original P)

4th column: the 24 points of T of that day extracted from the original T
(the column number 5 of the original T)

5th column: the 24 points of H of that day extracted from the original H
(the column number 5 of the original H)

Any help will be highly appreciated,

Regards

  • 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-05-17T22:30:50+00:00Added an answer on May 17, 2026 at 10:30 pm

    Here is what you ask for:

    % some sample data
    P = rand(24,31);
    T = rand(24,31);
    H = rand(24,31);
    % input day number
    daynum=input('Please enter the day number of March, 2000 from 1 to 31: ');
    [r, c] = size(P);
    % generate output matrix
    OutputMatrix = zeros(r,5);
    OutputMatrix(:,1) = repmat(weekday(datenum(2000,3,daynum)),r,1);
    OutputMatrix(:,2) = 1:r;
    OutputMatrix(:,3) = P(:,daynum);
    OutputMatrix(:,4) = T(:,daynum);
    OutputMatrix(:,5) = H(:,daynum);
    disp(OutputMatrix)
    

    The matrix can be generated in a one line, but this way is clearer.

    Is it always for March 2000? 🙂 Where do you get this information from?

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

Sidebar

Related Questions

Hi Guys could you please help me refactor this so that it is sensibly
I've recently written this with help from SO. Now could someone please tell me
could you please help me with this code? <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
I wonder if anyone could please help me I have been using HTML tidy
Could somebody please name a few. I could given time, but this is for
Could you please show me the C# Equivalent of this VB.NET code: Public Partial
Please help! I couldn't figure it out how to map the following situation: I
Could somebody please do a rundown of how to programmatically encrypt a config-file in
Could someone please demystify interfaces for me or point me to some good examples?
Could you please explain what the practical usage is for the internal keyword in

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.