MATLAB: How could i generate a vector homeworkvectors how can i generate this vector ? V3= [1 , 1/4 , 1/9 , 1/16 , 1/25 , … , 1/81 , 1/100] Best Answer V3 = 1 ./ (1:10).^2 Related SolutionsMATLAB: Matrix[1,1,1,1;-1,-1,-1,-1;1,1,1,1] to vector[1,1,1,1,-1,-1,-1,-1,1,1,1,1] I believe you intended semicolons (;) instead of colons (:) in your matrix definition.To convert it to a vector, use the reshape function:Matrix = [1,1,1,1; -1,-1,-1,-1; 1,1,1,1];Vector = reshape(Matrix', 1, [])Vector = 1 1 1 1 -1 -1 -1 -1 1 1 1 1EDIT — Added output of ‘Vector’. MATLAB: How could I generate a biphasic pulse train hello maybe this can help you freq = 10 ;Ts=1e-04;t=0:Ts:1;angl = 2*pi*(mod(freq*t,1));% % example 1 : positive square wave / mono phasic pulse train% square_wav = 0.5*(sign(sin(angl))+1);% plot(t,square_wav);% example 2 : bi phasic pulse traininterphase_gap = 10e-3; % gap (in second)gap_angl = 2*pi*freq*interphase_gap;angl(angl<=gap_angl/2) = 0;angl(abs(2*pi-angl)<=gap_angl/2) = 0;angl(abs(pi-angl)<=gap_angl/2) = 0;biphasic_pulse_train = sign(sin(angl));% plot(t,angl);plot(t,biphasic_pulse_train); Related QuestionGenerating vectors of length N with only -1s and 1s.How to convert a 64 bit, two’s complement value(binary vector)[ 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] into a signed integerGenerate sequence
Best Answer