num2str vs decimal numbers

num2str vs decimal numbers - ComboBoxList numeric evaluation - Сообщения

#1 Опубликовано: 14.12.2016 17:58:33
Jason McCool

Jason McCool

9 сообщений из 78 понравились пользователям.

Группа: User

Hello all, pardon me if this is submitted in the wrong place, but I think I have come across an issue that could be improved. I was using the ComboBoxList, populated by a 1-column matrix of beam depths to filter input options for a beam design worksheet. I'm also using the SQL plugin in conjunction with that. However, American WT sections have decimal designations such as "WT10.5x22". If I'm picking a size that uses a whole number designation, everything works fine. If I try picking the 10.5" depth to see those options in the next ComboBoxList, then it errors out. It seems the ComboBoxList is outputting the selected entry as a fraction such as 21/2 instead of as a decimal like 10.5. I've tried various option to try to force the decimal output, keeping the numeric entries I had in the source data. My original SQL functions I was using had the Num2str function to convert the selected value to a string and concatenate it with a SQL search query. If the ComboBoxList selection is output as a fraction, then it messes up the search string. I don't need to use the selected value for any calculations in this worksheet, so I worked around this issue by changing the d.nom_WT matrix to all string entries so the ComboBoxList doesn't evaluate them symbolically. However, I was just wondering if it wouldn't be helpful to have a third option in the ComboBoxList settings where it could also evaluate as "numeric" in addition to the current options of "Symbolic" or "Numeric + Symbolic". Hopefully, the attached screenshots help make sense of all this. Thanks!

Jason
Файл не найден.Файл не найден.
Jason McCool Robbins Engineering Little Rock, AR, USA
#2 Опубликовано: 14.12.2016 18:52:54
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Jason,

The issue is not related with ComboBoxList region, is about num2str(); try using var2str() from Custom Functions plugin instead.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
frapuano 15.12.2016 08:32:00
#3 Опубликовано: 14.12.2016 18:59:14
Jason McCool

Jason McCool

9 сообщений из 78 понравились пользователям.

Группа: User

Ah, OK. I didn't see that option in there. Thanks!

Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений