photo

Joe Exotic


Last seen: 4 years ago Active since 2021

Followers: 0   Following: 0

Spoken Languages:
English, Russian, Spanish

Statistics

MATLAB Answers

2 Questions
0 Answers

RANK
249,331
of 300,779

REPUTATION
0

CONTRIBUTIONS
2 Questions
0 Answers

ANSWER ACCEPTANCE
100.0%

VOTES RECEIVED
0

RANK
 of 21,084

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK

of 170,997

CONTRIBUTIONS
0 Problems
0 Solutions

SCORE
0

NUMBER OF BADGES
0

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
0 Discussions

AVERAGE NO. OF LIKES

  • Thankful Level 2
  • Thankful Level 1

View badges

Feeds

View by

Question


I have a function "f" that returns a 1x2 vector, and I need to make a 3x2 matrix M by stacking the outputs f(x1), f(x2), f(x3) on top of each other, but Matlab won't parse it.
First, I wrote: M = [f(x1); f(x2); f(x3)] That didn't work - it gave me only the first outputs of every f (resulting in a 3x1 ...

4 years ago | 1 answer | 0

1

answer

Question


Why is a statement like "sortrows(A)(2:4)" "invalid array indexing" and how can I circumvent adding an extra line of code to make it work?
I could write: sorted = sortrows(A) sorted(2:4) However this seems clumsy and unnecessarily long to me. How can I compress it...

4 years ago | 1 answer | 0

1

answer