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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:00:59+00:00 2026-06-12T22:00:59+00:00

I am calling the function like so: beta=NaN(size(rates,1),6); mats=[1:50]; mats2=[2 5 10 30]; for

  • 0

I am calling the function like so:

beta=NaN(size(rates,1),6);

mats=[1:50];

mats2=[2 5 10 30];

for i=1:2
y2=rates(i,mats2);
yM=rates(i,:);

dataList=struct('yM',yM,'mats',mats,'model',@NSS,'mats2',mats2,'y2',y2);

de=struct('min',[0;3.5],'max',[3.5;30],'d',2,'nP',200,'nG',600,'ww',0.1,'F',0.5,'CR',0.99,'R',0,'oneElementfromPm',1);


beta(i,:)=DElambdaVec(de,dataList,@OF);
end

However the output from DElabdavec, is a cell array:

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

How can I store each of these items on each pass of the for 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-12T22:01:00+00:00Added an answer on June 12, 2026 at 10:01 pm

    You can save the results to a cell array – beta in this case:

    beta{i} = DElambdaVec(de,dataList,@OF);
    

    Every element of beta is now an object returned by DElambdaVec, e.g.:

    beta{1}
    
    ans = 
    
    Fbest: 'Fbest'
    xbest: 'xbest'
      Fbv: 'Fbv'
    

    I used example values to create the entries here.

    Note that you have to initialize beta=[] before the loop.

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

Sidebar

Related Questions

So let's say I'm calling a function like so: some_function('pages',{attr1: 1, attr2: 2},function(){ alert('the
I have a function like this: MyFunction(double matrix[4][4]) {/*do stuff*/} I am calling this
I have the view function in django that written like a dispatcher calling other
I'm calling up with a $.getJSON in my custom function getSearch(). I'd like to
What is the difference of calling function like: testCall: function() and function testCall() in
I'm calling a function like this: myfunc($tab, {'top-left', 'bottom-left'}, defaults.tabRounded); The function definition is:
I'm calling a function like this: <?php print get_thumbnail('http://url.com/?skin=rss'); ?> Being a php newbie,
I'm calling a function like this : $.myFunction Depending on version a user may
First, I was calling my functions like this: var a=1; a=foo(a,2); Then I discovered
I would like to know if after calling functions the data I have in

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.