Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How can i create a large colum variable with continious step?
1 回表示 (過去 30 日間)
古いコメントを表示
Hey guys, I'm new to MatLab so this might be a basic question.
I need to make a plot of a blasting vibration. The data i posses to plot on the Y-axis includes 500 000 values. On the X-axis I need to plot the time. It must include 500 000 values with a continious step of 0,005s.
So i'm guessing i need some kind of loop to make a variable with 1 colum that looks like t=[0 0,005 0,010 0,015 0,020....]
Anyone knows how i can create this in Maple?
Thanks in advance!
0 件のコメント
回答 (1 件)
Thorsten
2016 年 11 月 9 日
編集済み: Thorsten
2016 年 11 月 9 日
You don't need a loop, you can use Matlab's colon operator to define a range of values first_value:step_size:last_value. You can also use linspace(first_value, last_value, Npoints).
y = rand(1, 500000); % fake some data
Npoints = numel(y);
delta = 0.005;
x_max = delta*Npoints - delta;
x = 0:delta:x_max;
or
x = linspace(0, x_max, Npoints);
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!