From: parthiv trivedi on 18 May 2010 15:57 clc; close all; clear all; fs=25000; f0=2000; d=(f0/fs); n=0:1:99; if mod(n,2)==0 then n=m; end x=sin(2*pi*d*m); plot(m); 'm trying to plot only even numbers from 0 to 99 for sin funtion(here n and m). This code runs but nothing happens after that! can any1 pls solve it for me? Thanks.
From: TideMan on 18 May 2010 16:09 On May 19, 7:57 am, "parthiv trivedi" <parthiv_...(a)rediffmail.com> wrote: > clc; > close all; > clear all; > > fs=25000; > f0=2000; > d=(f0/fs); > n=0:1:99; > > if mod(n,2)==0 > then n=m; > end > x=sin(2*pi*d*m); > plot(m); > > 'm trying to plot only even numbers from 0 to 99 for sin funtion(here n and m). This code runs but nothing happens after that! > > can any1 pls solve it for me? > Thanks. m=n(1:2:end);
|
Pages: 1 Prev: SimMechanic constraints question Next: Generate programmatically new variables |