Statistics
All
RANK
263,324
of 290,061
REPUTATION
0
CONTRIBUTIONS
2 Questions
0 Answers
ANSWER ACCEPTANCE
0.0%
VOTES RECEIVED
0
RANK
of 19,634
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
Question
How to vectorize this "for" loop, or parallel it.
fun = @(x,y) x + x.*y; N = 1e3; K = zeros(N); for i = 1:N for j = i:N K(i,j) = fun(i, j); end end
10 years ago | 2 answers | 0
2
answersQuestion
Convert the variables x1, x2,... in an anonymous function to x(1,:) ,x(2,:).....
For example: f = @(x1, x2, ... , x15) x1 .* x2 .* ... .* x15 I want get: f = @(x) x(1,:) .* x(2,:) .* ... .*x(15,:)
11 years ago | 2 answers | 0