- In the code given above the second argument of the “sim()” restricts the total simulation time to 0.01 seconds. This time may not be enough for the pulse generator to compute 10000 points
- The possible workarounds include dropping the second argument in “sim()” which resets the simulation time to the default value of 10.
- Yet another workaround may be is to change the "Max step size" parameter in "Configuration Parameters" to a sufficiently low value that enough output points are generated.
why when I transfer signal from simulink to matlab via block 'to workspace' , I cant control the sample numbers ?
2 次查看(过去 30 天)
显示 更早的评论
I want to transfer pulse genrator block that is in smiulink , to matlab but for some reason the resultion is very small ( I have few sample dots ) , while I choose 10K points , I get only 2001 . where is the problem ?
clc;clear all;close all;
sim('test_function',0.01)
size(pulse_gen.signals.values )
in the pic of 'simulink_problem' you can see that I changed, the Limit data points to last: 10e3 .
how ever I get for some reason 2001 points , why is that ,and how to fix this problem in order to get more samle points in matlab struct ? becouse the defualt sampling points is too small.. to make a good plot of the simulink results .
0 个评论
回答(1 个)
Jyothis Gireesh
2020-1-2
Here are a few pointers which may be of help to you:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!