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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:10:30+00:00 2026-06-13T03:10:30+00:00

I’d like to use Matlab with EC2, its basically an embarrassing parallel problem so

  • 0

I’d like to use Matlab with EC2, its basically an embarrassing parallel problem so I don’t necessarily need the parallel toolbox.

Reading the blog here:

http://aws.typepad.com/aws/2008/11/parallel-comput.html

The link to the white paper, actually takes you to a webpage where it says that the service is only available in USA and Canada (I’m UK based) but that you can register your interest.

Moreover it seems there may be an issue with licences? If I have to buy a new license for each CPU its a non starter for me.

My program doesn’t really use any big MATLAB function like lsqmin, so in theory it should be easily convertible to Octave (I think).

If using Matlab with EC2 is not possible for any of the reasons above can anyone tell me how to use Octave with EC2?

function [output]=DElambda(de,data,OF)

 P1=zeros(de.d,de.nP);
 Pu=zeros(de.d,de.nP);

 for i=1:de.d
 P1(i,:)=de.min(i,1)+(de.max(i,1)-de.min(i,1))*rand(de.nP,1);
 end


 P1(:,1:de.d)=diag(de.max);
 P1(:,de.d+1:2*de.d)=diag(de.min);


 for i=1:de.nP
 betas(:,i)=NSS_betas(P1(:,i),data);
 end

 Params=vertcat(betas,P1);

 Fbv=NaN(de.nG,1);
 Fbest=realmax;



 F=zeros(de.nP,1);
 P=zeros(de.nP,1);


for i=1:de.nP 

F(i)=OF(Params(:,i)',data);

P(i)=pen(P1(:,i),de,F(i));
F(i)=F(i)+P(i);


 end

 [Fbest indice] =min(F);
 xbest=Params(:,indice);


Col=1:de.nP; 

for g=1:de.nG
P0=P1;
rowS=randperm(de.nP)';
colS=randperm(4)';
RS=circshift(rowS,colS(1));
R1=circshift(rowS,colS(2));
R2=circshift(rowS,colS(3));
R3=circshift(rowS,colS(4));

%mutate
Pm=P0(:,R1)+de.F*(P0(:,R2)-P0(:,R3));
%extra mutation
if de.R>0 
    Pm=Pm+de.r*randn(de.d,de.nP);
end

%crossover
PmElements=rand(de.d,de.nP)<de.CR;
%mPv(MI)=mP(Mi);
if de.oneElementfromPm
   Row=unidrnd(de.d,1,de.nP);
   ExtraPmElements=sparse(Row,Col,1,de.d,de.nP);
   PmElements=PmElements|ExtraPmElements;
end

P0_Elements=~PmElements;
Pu(:,RS)=P0(:,RS).*P0_Elements+PmElements.*Pm;
%%%need to add penalty!!!!!!!!!!!!
%select vector to enter next generation

for i=1:de.nP
betasPu(:,i)=NSS_betas(Pu(:,i),data);
end



ParamsPu=vertcat(betasPu,Pu);
flag=0;
for i=1:de.nP
    %for j=1:dates
    %Ftemp=feval(OF,Pu(:,i)',data,j);
    Ftemp=OF(ParamsPu(:,i)',data);
    %end
    %Ftemp=OF(Pu(:,i),data);
    Ptemp=pen(Pu(:,i),de,F(i));
    Ftemp=Ftemp+Ptemp;

    if Ftemp<=F(i);
        P1(:,i)=Pu(:,i);
        F(i)=Ftemp;
        if Ftemp < Fbest
        Fbest=Ftemp; xbest=ParamsPu(:,i); flag=1;
        end
    else
        P1(:,i)=P0(:,i);
    end    
end

if flag
    Fbv(g)=Fbest;
end

end

output.Fbest=Fbest; output.xbest=xbest; output.Fbv=Fbv;
end



 function penVal=pen(mP,pso,vF)

minV=pso.min;
maxV=pso.max;
ww=pso.ww;

A=mP-maxV;
A=A+abs(A);

B=minV-mP;
B=B+abs(B);

C=ww*((mP(1,:)+mP(2,:))-abs(mP(1,:)+mP(2,:)));
penVal=ww*sum(A+B,1)*vF-C;


end
  • 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-13T03:10:31+00:00Added an answer on June 13, 2026 at 3:10 am

    One idea that doesn’t require additional licenses would be to deploy the MATLAB Compiler Runtime (MCR) on your EC2 instances. Then use the MATLAB Compiler to create executables of your code and run them on those EC2 instances.

    The MCR is provided with MATLAB Compiler for distribution with your
    application and can be deployed royalty-free.

    If you want to take this approach further, consider running a local job-queue that distributes work across available EC2 instances. This seems to be a nice write-up on how to do so.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported

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.