automatically assign class type in matlab -


i'd obtain class type of variable , use function in matlab.

for example, x of class uint8. can obtain info classtype=class(x).

what i'd use on different variable automatically, such as:

y=classstype(y) 

where y of type logical example.

how can accomplish that?

it sounds you're trying cast value of y different class. end, try using matlab's cast() function.

in specific instance, try:

y = cast(y, class(x)) 

this should class of variable x , cast variable y class.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -