Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
logic to come back and exit the application

Subject: logic to come back and exit the application

From: wahyoe Unggul

Date: 26 Feb, 2011 08:48:04

Message: 1 of 1

hai all

function square_area
clear;
disp('square_area')
l=input('input lenght');
w=input('input width');
disp(['lenght =' num2str(l)])
disp(['Width =' num2str(w)])
a=l*w;
disp(['square_area = ',num2str(a)])
d=input('if you want to count again yes =1, no=2');
 switch d
     case {'1','yes'}
         return
     case {'2','no'}
         close
 end

Can you help me, I make the application
1. after the completion count can go back to the beginning of the calculation?
2. after the completion count can exit the application?
thank you
Wahyoe

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us