probably a simple MATLAB solution

Novice needs help with a simple problem

Page 1 of 1

1 Replies - 830 Views - Last Post: 01 May 2009 - 01:28 PM Rate Topic: -----

#1 canopy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 01-May 09

probably a simple MATLAB solution

Post icon  Posted 01 May 2009 - 10:11 AM

Ok, so I'm not a programmer by any means, I'm a geologist - truth be told. I'm working on a melting model of the mantle and don't normally have to get too in depth with my MATLAB scripts.

I've been trying to use this function fmincon to find a minimum value for this function, but its not outputting believable answers. So I've decided to see if its possible to just brute force find a solution.

my input is an array, one by ten x=[x1 x2 x3... x10]

the only possible solutions include the constraint that each progressive element is greater than or equal to the one before it ie x3=>x2=>x1...

so I want to build a matrix with columns being each possible solution. Values for elements can be between 0 and .4 in increments of .01. I cant input zero, so I need to start at .00001.

This set up probably sounds pretty idiotic, but I've given up doing this a reasonable way - if someone could just help me construct the right set up of for loops or whatever, that'd be amazing.

Thanks,

Canopy

This post has been edited by canopy: 01 May 2009 - 10:11 AM


Is This A Good Question/Topic? 0
  • +

Replies To: probably a simple MATLAB solution

#2 canopy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 01-May 09

Re: probably a simple MATLAB solution

Posted 01 May 2009 - 01:28 PM

Let me rephrase that for clarity:

If my only possible values were 1, 2 and 3, and my columns were only 4 elements tall, I'd want to generate

0000000000000000000011111111122223
0000000000111111222311111222322233
0000111223111223223311223223322333
0123123233123233233313233233323333


instead though, I want it to have possible values between 0 and .4 by increments of .01, and be 10 elements tell.

finally, I cant have actual 0s, I need them to be .00001s instead

This post has been edited by canopy: 01 May 2009 - 01:29 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1