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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:54:40+00:00 2026-06-14T04:54:40+00:00

I have a state S that needs to change to state S’ with a

  • 0

I have a state S that needs to change to state S’ with a probability of Acceptance Pa. I’ve computed the probability of acceptance, and I have the two states (column vectors of 3 numbers each). I want to tell matlab to accept the change from S to S’ with probability Pa.

Note: this is going to be inside a loop, and for each iteration Pa is computed and S changes to S’ with probability Pa.

Help is appreciated

edit: here’s what I have so far. there is a matrix of all 35 possible states (Pool). S’ is Sn here.

S = [5;5;5];
indexn = randi(35);
Sn = Pool(:,indexn);

Cost is calculated here

PA = exp(-deltacost/k*T);

The next step would be to change S to Sn with probability PA. I might be overthinking this, but I don’t know how to change it.

  • 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-14T04:54:41+00:00Added an answer on June 14, 2026 at 4:54 am

    This should do the trick

    if Pa<rand()
        do the change
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WP7 XNA game that needs to save the state whenever the
I have a backend process that maintains state in a PostgreSQL database, which needs
I have a QML part of my application that needs to know what state
First of all, i have to state that i am new to Java in
I have a State class that includes configuration as well as some state-specific methods.
I have state data in a txt file that I used to seed my
I state that I am a complete beginner to LDAP. I have to let
Before I ask the question let me state that I have attempted to google
basically i have (state, state code) pairs, that are subsets of country [USA] ->
Lets say that you have a business object whose current state implies that there

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.