Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9036077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:54:10+00:00 2026-06-16T08:54:10+00:00

Consider I have a = input(value = ); how can I prevent user from

  • 0

Consider I have

a = input(value = );
how can I prevent user from enter i and j as the input values. I would like to have a code some thing like tat
if a == any value involves i and j
then break or terminate
and prompt the function a = input(value = ) again.

between I have tired something like this, but it doesn’t work (the error is still coming out and it unable to prompt the second defined input a = input(‘enter again’)), can anybody explain to me where’s the mistake I have done.

if ~isnan(x) || ~isnumeric
    a = input('enter again');
else
    continue
end

I will really appreciate all the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T08:54:11+00:00Added an answer on June 16, 2026 at 8:54 am

    try this

    a = NaN;
    while isnan(a) || ~isreal(a)
       a = input('value=','s');
       a = str2double(a);
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider I have an anchor which looks like this <div class=res> <a href=~/Resumes/Resumes1271354404687.docx> ~/Resumes/Resumes1271354404687.docx
Consider i have a user table and I have three columns mobilePhone , homePhone
I have a text file as input like this:let say it as xyz.txt TIME
I have a form with an input( price ) that a user fills with
I have the following HTML <form id=create_form name=create_form action= method=post> <input name=type id=type value=individuel
This code comes from K&R. I have read it several times, but it still
I have a BarEditor.ascx, that can be called from diffent places. <%@ Control Language=C#
Consider the html <div id=one > <input type=radio value=x name=group > <input type=radio value=y
Consider this HTML: <input type=text name=inputa[42] value=2012-05-02 /> <input type=text name=inputb[42] value=74,178 /> <input
Consider I have a game-creation framework, with a basic class called Game. // Action

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.