rich_lord Posted March 24, 2015 Share Posted March 24, 2015 This doesnt seem to work in a point wrangle. I get a red line underneath fitnum when its inside the vector. Whats the proper way to assign to a vector? Thanks float num = rand(@ptnum); float fitnum = fit(num,0,1,3,10); v@wspeed = {fitnum,0,0}; Quote Link to comment Share on other sites More sharing options...
rich_lord Posted March 24, 2015 Author Share Posted March 24, 2015 Crap - this always happens, the second I post I realize I can assign to individual vector components like this: wspeed.x = fitnum; apologies! Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted March 24, 2015 Share Posted March 24, 2015 you can as well do the whole vector using set function like: @Cd = set(@P.x, 0.5, random(@ptnum+25.22)); Quote Link to comment Share on other sites More sharing options...
rich_lord Posted March 25, 2015 Author Share Posted March 25, 2015 Thats super useful John - Thanks! Quote Link to comment Share on other sites More sharing options...
pbarua Posted March 25, 2015 Share Posted March 25, 2015 You can also use setcomp() VEX function. setcomp(@wspeed, fitnum, 0); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.