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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:10:43+00:00 2026-05-26T07:10:43+00:00

So im trying to figure out how to be able to use, parameters =

  • 0

So im trying to figure out how to be able to use,

parameters = {[6 12 18 24], [1200 1800 2400 3000], [80 90 100],[80 90 100],[80 90 100]};

[r T3 Ec Et Er ] = ndgrid(parameters{:});

Allcombinations = [r(:) T3(:) Ec(:) Et(:) Er(:)];

this gives me all possible combinations of from my orginal parameters

I need to plug each combination of parameters into many equations is whats the best way to do that?

for example if i want to pull out the 1st row and plug the corresponding values into say for example;

%# Note: k, Cp and T1 are predefined constants

Ec1=Ec/100;

Et1=Et/100;

Er1=Er/100;

T2s=T1*(r)^((k-1)/k);

T4s=T3*(1/r)^((k-1)/k);

T2a=((T2s-T1)/Ec1)+T1;

T4a=T3-Et1*(T3-T4s);

wca=Cp*(T2a-T1);

wta=Cp*(T3-T4a);

T5s=Er1*(T4a-T2a)+T2a;

qcombustion=Cp*(T3-T5s);

qregen=Cp*(T5s-T2a);

qin=qcombustion+qregen;

fprintf ('\n Net Work Output=%6.2f', wnet)

fprintf ('\n Back Work Ratio=%4.2f', rbw)

fprintf ('\n Thermal Efficiency=%4.2f\n', Eth)

Im not sure but would I some how use Allcombinations(n,:)

I would really appreciate some help
Thank you

  • 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-26T07:10:44+00:00Added an answer on May 26, 2026 at 7:10 am

    You can calculate everything for all possible combinations using element-wise operators in one go:

    %# Note: k, Cp and T1 are predefined constants
    
    parameters = {[6 12 18 24], [1200 1800 2400 3000], [80 90 100],[80 90 100],[80 90 100]};
    
    [r T3 Ec Et Er ] = ndgrid(parameters{:});
    
    %# turn arrays into vectors
    r = r(:);
    T3 = T3(:);
    Ec1=Ec(:)/100;
    Et1=Et(:)/100;
    Er1=Er(:)/100;
    
    %# perform calculations using element-wise operators
    
    T2s=T1.*(r).^((k-1)/k);
    
    T4s=T3.*(1./r).^((k-1)/k);
    
    T2a=((T2s-T1)./Ec1)+T1;
    
    T4a=T3-Et1.*(T3-T4s);
    
    wca=Cp*(T2a-T1);
    
    wta=Cp*(T3-T4a);
    
    T5s=Er1.*(T4a-T2a)+T2a;
    
    qcombustion=Cp*(T3-T5s);
    
    qregen=Cp*(T5s-T2a);
    
    qin=qcombustion+qregen;
    
    %# Warning: These statements will produce a lot of output!
    
    %# If you want to show the output for, say, combination #5
    %# use e.g. wnet(5)
    
    fprintf ('\n Net Work Output=%6.2f', wnet)
    
    fprintf ('\n Back Work Ratio=%4.2f', rbw)
    
    fprintf ('\n Thermal Efficiency=%4.2f\n', Eth)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to figure out the best data structure to use for this
I am trying to use Async controller and am not able to figure out
I'm trying to figure out if I'm able to use delayed_job . I would
I'm trying to figure out how to redirect istream to wxwidgets. I was able
In SQL Server 2005, I'm trying to figure out why I'm not able to
Trying to figure out which to use.
Trying to figure out the best way to do this: Should I do something
Trying to figure out this pseudo code. The following is assumed.... I can only
I'm trying to figure out if something like this would be possible. We are
I am trying to figure out the use of Maven and I got many

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.