How to generate data
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Manish Kumar
am 7 Mär. 2019
Kommentiert: Jos (10584)
am 7 Mär. 2019
Dear experts,
I need help to generate the data for the following situation.
I want to generate data for x in the range of 0 to 5 with the interval of 0.01. For each x there is y in the range of 0 to 3 in the interval of 0.01. After that I want to make two columns of x and y.
Kindly help.
0 Kommentare
Akzeptierte Antwort
KSSV
am 7 Mär. 2019
x = 0:0.01:5 ;
y = 0:0.01:3 ;
[X,Y] = meshgrid(x,y) ;
iwant = [X(:) Y(:)]
0 Kommentare
Weitere Antworten (1)
Jos (10584)
am 7 Mär. 2019
I suggest you read parts of the starters manual and the help, and start exploring matlab :-)
help linspace
help colon
x = 1:2:5
f = 3/5
y = f .* x
2 Kommentare
Jos (10584)
am 7 Mär. 2019
help reshape
help transpose
Is there a relationship between a value of x and a value of y, like a formula?
Siehe auch
Kategorien
Mehr zu Waveform Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!