Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Building Input-Looping Problem

2 visualizzazioni (ultimi 30 giorni)
Alvi Syahrin
Alvi Syahrin il 24 Mag 2013
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Anyone can help me with the script of input-looping? Example, there is three variables, let us say 'coloumn', 'k', and 'c'. 'coloumn' has been set three. 'k' and 'c' are user's inputs. Here it works...
1. If users inputs k=3, then they must input 'c' for 9 times (k x coloumn). If users input k=4, then they must input 'c' for 12 times (k x coloumn).
2. After 'k' is inputted, the message box will be appeared for user to input the c for as many as they input the (k x coloumn).
[maxRow, maxCol] = size(data);
k=input('Enter a number');
% now I'm stuck with the 'c' thing%
Any idea? Your help will be much appreciated.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by