Matrix function — problem with the defi
Hi!
I wrote this code where Y is a cell array (actually is a matrix [y1; y2; y3] and F is a matrix that I would like to be like the function of Y — I mean if Y = [y1; y2; y3] -> F(Y) = [1; y3; f(y1, y2, y3)] where f – another function.
How can I realize this in Matlab? Unfortunely this code does not work in an appropriate way. ;(
Thanks!
Y = @(y1, y2, y3) {@(y1) y1; @(y2) y2; @(y3) y3};
F = @(Y) [1; Y(3); f(Y(1), Y(2), Y(3))]Hi!
I wrote this code where Y is a cell array (actually is a matrix [y1; y2; y3] and F is a matrix that I would like to be like the function of Y — I mean if Y = [y1; y2; y3] -> F(Y) = [1; y3; f(y1, y2, y3)] where f – another function.
How can I realize this in Matlab? Unfortunely this code does not work in an appropriate way. ;(
Thanks!
Y = @(y1, y2, y3) {@(y1) y1; @(y2) y2; @(y3) y3};
F = @(Y) [1; Y(3); f(Y(1), Y(2), Y(3))] Hi!
I wrote this code where Y is a cell array (actually is a matrix [y1; y2; y3] and F is a matrix that I would like to be like the function of Y — I mean if Y = [y1; y2; y3] -> F(Y) = [1; y3; f(y1, y2, y3)] where f – another function.
How can I realize this in Matlab? Unfortunely this code does not work in an appropriate way. ;(
Thanks!
Y = @(y1, y2, y3) {@(y1) y1; @(y2) y2; @(y3) y3};
F = @(Y) [1; Y(3); f(Y(1), Y(2), Y(3))] function, matrix, array, cell arrays MATLAB Answers — New Questions