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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:42:39+00:00 2026-05-15T02:42:39+00:00

I have a large set of parameters P which take several distinct sets of

  • 0

I have a large set of parameters P which take several distinct sets of values V_i and want to use ActionMenu[] to make assigning P=V_i easy, like so:

ActionMenu["Label", {"name_1" :> (P = V_1;),..}]

Now the problem is that the set of V_i’s is large and not static, so instead of coding a long list {"opt_1" :> (P = V_1;),..} over and over by hand, I’d like to generate it.

I am completely stumped at how to do it. The general approach is something like

Thread@RuleDelayed[listOfNames,listOfActions]

where listOfActions should be something like

Thread@Set[repeatedListOfP,listOfV_i]

But this does not work. And since Set[] is a very special function, none of my other usual approaches work (building a Table[], replacing headers, etc). How do you go about constructing a list of Set[] operations?

  • 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-15T02:42:40+00:00Added an answer on May 15, 2026 at 2:42 am

    There may be more to your question that I haven’t grokked yet but maybe this will get you on the right track.

    This

    MapThread[Hold[#1 = #2]&, {{a, b, c}, {1, 2, 3}}]
    

    returns a list of unevaluated “Set”s like so:

    {Hold[a = 1], Hold[b = 2], Hold[c = 3]}
    

    If you call ReleaseHold on the above then the assignments will actually happen.

    More on Hold and relatives here:
    Mathematica: Unevaluated vs Defer vs Hold vs HoldForm vs HoldAllComplete vs etc etc

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

Sidebar

Related Questions

I have a large set of values V, some of which are likely to
I have large set of flow charts and workflow diagrams. I want to draw
I have a large set of lines, which I render from a vertex buffer
I have a large set of strings. I want to divide the strings into
I have a large set of data which I access via a generator/iterator. While
I have a python module which generates large data files which I want to
I have a large set classes which I need to wrap in a very
Context: We have several pieces of our infrastructure that are managed by large sets
I have a large set of data that is generated from a web service
I have a large set of documents in a CouchDB database that were just

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.