Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

timing based execution selection and execution

1 vue (au cours des 30 derniers jours)
Bablu Singh
Bablu Singh le 23 Fév 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by