how to do rising and falling edge in single signal using signal builder..?
Show older comments

7 Comments
Umar
on 29 Jul 2024
Hi @Vinay,
Open the Signal Builder tool in Matlab. Create a new signal by clicking on the "New" button.In the signal editor, define the rising edge by setting the desired amplitude for the rising part of the signal.Add a second segment to the signal and set the amplitude to create the falling edge. Adjust the time duration for each segment to control the rising and falling edge timings. Save the signal and run the simulation to observe the rising and falling edges in the single signal.
Let me know if this is what you were looking for.
Aquatris
on 30 Jul 2024
You can create a new 'Square' signal and play with its points to get the exact signal you want.
Umar
on 30 Jul 2024
@Vinay,
@Aquatris and @Shubham provided their contributions to your problem. Please let us now know if you still have any further questions for us. Once you accept the answer, please vote for them for their efforts.
VINAY
on 31 Jul 2024
Umar
on 31 Jul 2024
Hi @Vinay,
In addendum to my recent comments about signal editor, again to create rising and falling edges, you need to add points to the signal. Click on the signal to add points at specific time instances. For a rising edge, set the value of the point before the rising edge to a lower value and the value of the point after the rising edge to a higher value. For a falling edge, reverse this process. Also, please make sure that the interpolation method is suitable for your rising and falling edge requirements. In addition, you can add multiple rising and falling edges by adding points at different time instances in the signal. Please let us know if you have any further questions.
VINAY
on 31 Jul 2024
VINAY
on 31 Jul 2024
Accepted Answer
More Answers (1)
Shubham
on 30 Jul 2024
Hi Vinay,
To create a signal with rising and falling edges using the Signal Editor in MATLAB, you can follow these steps:
1. Define the Time and Data Vectors
First, define the time and data vectors in MATLAB:
% Define time vector
time = [0, 1, 2, 3, 4, 5];
% Define data points for rising and falling edges
data = [0, 1, 1, 0, 0, 1];
2. Create a timeseries Object
Create a timeseries object using the defined vectors:
% Create a timeseries object
ts = timeseries(data, time);
3. Save the timeseries Object to a MAT File
Save the timeseries object to a MAT file, which can be imported into the Signal Editor:
% Save the timeseries object to a MAT file
save('my_signal.mat', 'ts');
4. Open the Signal Editor
Open the Signal Editor:
signalEditor
5. Import the timeseries Object in Signal Editor
In the Signal Editor, follow these steps to import the timeseries object:
- Open the Signal Editor:
- Run the signalEditor command in MATLAB to open the Signal Editor.
2. Import the MAT File:
- In the Signal Editor, go to File > Import.
- Select MAT-file as the import source.
- Browse to the location where you saved my_signal.mat and select it.
- Follow the prompts to import the timeseries object.
3. Visualize and Edit the Signal:
- Once imported, you should see the signal in the Signal Editor.
- You can now visualize and edit the signal as needed.
Here is the screenshot obtained by running the above mentioned code:

Categories
Find more on Signal Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
