Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: set parameter value

$
0
0
Given that you know the different values in advance why not just define

>> t = sort([0 10:10:90 10:10:90 100]);
>> values = [0 1 2 3 4 5 6 7 8 9]; % replace with your required values
>> u = [values; values];
>> tu = [t(:) u(:)];

Then use tu as the variable in a From Workspace block?

To see what this will look like you can plot it in MATLAB
>> plot(tu(:,1),tu(:,2));

(Yes you could use set_param (most likely in a MATLAB function block placed in a triggered subsystem with the trigger being a square wave set at the appropriate frequency but there doesn't seem to be any need to.)

Phil.

Viewing all articles
Browse latest Browse all 19628

Latest Images

Trending Articles



Latest Images