
laplace transformation for array
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello every one
I try to do laplace transformation for this array
M = [exp(x) 1; sin(y) i*z];
i do "laplace(M)" but the answer is not correct
I read the help
"syms a b c d w x y z
M = [exp(x) 1; sin(y) i*z];
vars = [w x; y z];
transVars = [a b; c d];
laplace(M,vars,transVars)" but I get error
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
??? Error using ==> sym.maple at 87
Error, (in laplace) invalid input: laplace expects its 2nd argument, t, to be of type name, but
received array(1 .. 2, 1 .. 2,[(1, 1)=w,(2, 1)=y,(1, 2)=x,(2, 2)=z])
Error in ==> sym.laplace at 79
L = maple('map','laplace',F,t,s);
Error in ==> laplace at 5
laplace(M,vars,transVars)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
please help me
0 Commenti
Risposte (1)
Dev
il 28 Mar 2025
To perform the Laplace transformation for the array M = [exp(x) 1; sin(y) i*z], we first need to define symbolic variables to represent mathematical symbols rather than specific numerical values. This step is essential to perform transformations like the Laplace. To do so, we can use the ‘Symbolic Math Toolbox’ provided in MATLAB to create symbolic variables using the ‘syms’ function and then define the required matrix. Both the steps are represented in the code snippet below-
% Define symbolic variables
syms x y z s
% Define the matrix
M = [exp(x), 1; sin(y), 1i*z];
Next, we can use the ‘arrayfun’ function in MATLAB to perform the Laplace transformation on each element of the matrix M. To do so, we can use the ‘laplace’ function in the Symbolic Math Toolbox. I have added an example code snippet below which does the same.
% Perform Laplace transform on each element of the matrix
L = arrayfun(@(element) laplace(element, s), M);
Finally, we can display ‘L’ which prints the Laplace transformation performed on M. I have also attached the output for your reference below.

For more information regarding the functions used above, kindly refer to the documentation links below-
Symbolic Math Toolbox- https://www.mathworks.com/products/symbolic.html
I hope the above explanation resolves the question.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!