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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:31:29+00:00 2026-06-12T16:31:29+00:00

I am trying to compute x1^i * x2^j * x3^k * …… This is

  • 0

I am trying to compute x1^i * x2^j * x3^k * ......

This is my code so far:

for l = 1:N
f = 1;
for i = 0:2
    for j = 0:2-i
        for k = 0:2-j
            for m = 0:2-k
                g(l,f) = x1(l)^i*x2(l)^j*x3(l)^k*x4(l)^m;
                f = f+1;
            end
        end
    end
end
end

How can I do this easier or without a loop?

  • 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-12T16:31:30+00:00Added an answer on June 12, 2026 at 4:31 pm

    I do not have MATLAB on hand here, but what I’d do is make a vector X = [x1, x2, …, xn] of bases and a vector P = [i, j, k, …, z] of powers, and then compute prod(power(X, P)).

    power() does an element-wise power function, and prod takes the product of every element in the vector.

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

Sidebar

Related Questions

I'm trying to use a matrix to compute stuff. The code is this import
i'm trying to compute the Lorenz system using Runge Kutta method, but i can't
I'm trying to compute the maximal weight in a heap with this function: unsigned
I'm trying to compute hmac using sha-512. The Perl code: use Digest::SHA qw(hmac_sha512_hex); $key
I'm trying to compute duration in awk having start and end date. Here is
I'm trying to compute the intercept of a slope but I can't all of
Can anybody tell me what is the problem in this code... Basically I am
I was trying to develop a code to compute the [prime factors][1] of a
I'm trying to compute this equation: int n = 89; int SUMx = 347762,
I'm trying to write C++ code which will compute all possible orderings of groups

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.