Converting a string array into a number array
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
Please how can l convert '123456789' to [ 1 2 3 4 5 6 7 8 9] in MATLAB
採用された回答
KALYAN ACHARJYA
2021 年 2 月 13 日
編集済み: KALYAN ACHARJYA
2021 年 2 月 13 日
#Edited
num_str='123456789'
num_str - '0'
Result:
ans =
1 2 3 4 5 6 7 8 9
7 件のコメント
dzix design
2021 年 2 月 13 日
Thanks sir 🙏🏼. You just saved me much time in a coding problem
KALYAN ACHARJYA
2021 年 2 月 13 日
dzix design
2021 年 2 月 13 日
May l have your WhatsApp number Sir?
KALYAN ACHARJYA
2021 年 2 月 13 日
編集済み: KALYAN ACHARJYA
2021 年 2 月 13 日
Available in the profile description, but I rarely reply to unknown.
:)
Jan
2021 年 2 月 13 日
The is no reason to apply num2str(), when the variable is a CHAR vector already. Easier:
num_str = '123456789'
result = num_str - '0'
KALYAN ACHARJYA
2021 年 2 月 13 日
Yes sir @Jan Thanks, In day time, I have answered a similar question, which first required changing num2str, so I used it here by mistake.
Your teaching is very valuable, thank you and much appreciation
dzix design
2021 年 2 月 13 日
@jan thanks 🙏🏼
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
