Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Square root of a matrix

Subject: Square root of a matrix

From: Gaurav Sharma

Date: 27 Feb, 2012 21:43:13

Message: 1 of 2

i want to calculate the square root of sum of two matrices in simulink embedded function but as it does not support sqrtm function i used eml.extrinsic as-----

function sqrt = fcn(A,B)
eml.extrinsic('sqrtm');
sqrt=sqrtm(A+B);

but it gives error as----

"Function output 'sqrt' cannot be of MATLAB type."

plz tell me whats the problem..

Subject: Square root of a matrix

From: Sadik

Date: 27 Feb, 2012 23:44:13

Message: 2 of 2

Hi Gaurav,

Honestly I don't know, but I would certainly try changing the variable name from sqrt to sqrtX or something else because you know matlab has a built-in function called sqrt().

This may or may not solve the problem, just a suggestion.

Best.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us