timing based execution selection and execution

clear all;
close all;
clc;
t=1:1000;
fm=4000;
fs=80000;
msg=sin(2*pi*fm*t); %%% I want this signal for for 1000ms
a1=[100,200,300;0,150,0;250 350 400];
[m,n]=size(a1);
for i=1:m
for j=1:n
if a1(i,j)>0 % this loop i want to continue for 100ms and after 100ms i want that i,j value should be changed (a1 value) but msg should continue from were it has finished 100ms
result(i,j)=msg*cos(2*pi*a1(i,j)*t);
else
result(i,j)=0
end
end
end

Antworten (0)

Diese Frage ist geschlossen.

Gefragt:

am 23 Feb. 2019

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by