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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:05:03+00:00 2026-05-27T01:05:03+00:00

I have three vectors which are orthogonal b_vect = [1 2] L_vect = [10

  • 0

I have three vectors which are orthogonal

   b_vect = [1 2]
   L_vect = [10 20 30]
   f_vect = [100 200 300]

and I would like to do element-for element-operations. I use repmat to duplicate the vectors along the other dimensions so 3D arrays are obtained.

   b_arr = repmat(b_vect , [length(f_vect), length(L_vect), 1])   % Wrong?!
   L_arr = repmat(L_vect , [length(f_vect), 1, length(b_vect)])   % Good!
   f_arr = repmat(f_vect', [1, length(L_vect), length(b_vect)])  % Good!

This however goes wrong because of the orientation of b_vect. For f_arr it was possible to take the rotated vector f_vect'$, but how should this be done in the case of b_vect?

   size(b_arr)
   size(L_arr)
   size(f_arr)

The element-for-element product would for instance then be

   product = b_arr.*L_arr.*f_arr
  • 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-27T01:05:04+00:00Added an answer on May 27, 2026 at 1:05 am

    I think you should do:

    b_vect = reshape([1 2],[1 1 numel(b_vect)]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three vectors in an xts R object. Call them V1, V2, V3.
I have a set of three vectors: x, y, and z that I want
I have a problem where I have to add thirty-three integer vectors of equal
I have two vectors, v1 and v2 v1 <- c('one', 'two', 'three') v2 <-
I a having a little trouble with vector or array operations. I have three
I have a program which iterates over an array, deterministically making new row-vectors which
I have a struct which has some vectors as members: struct my_struct { std::vector<int>
In my code I have a class lipid which holds three bead s: struct
I have two floating-point number vectors which contain the same values up to a
I have a string which looks like this .V/1LBOG^ .F/AV0094/08NOV/SAL/Y^ .N/0134249356001^ .S/Y/17K/C/064/064^ .W/K/1/13^ .P/TELLEZBAQUERO/XIMENABKB^

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.