Convert Two Character String into a Binary Vector - MATLAB Cody - MATLAB Central

Problem 1466. Convert Two Character String into a Binary Vector

Difficulty:Rate

Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0]

Paul Berglund implemented an optimal method in Snow Cones

Input: "XXOOX"

Output: [1 1 0 0 1]

Solution Stats

63.0% Correct | 37.0% Incorrect
Last Solution submitted on May 03, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Matrix Patterns II Image
Matrix Patterns II
  • 15 Problems
  • 69 Finishers

Problem Recent Solvers211

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page