Borrar filtros
Borrar filtros

I am getting a single number , but what want to get is a vector so that I can graph this formula

1 visualización (últimos 30 días)
The last formula, amp1 is supposed to give me a vector, all the numbers are constants except for gamma1 thats a vector. I want to know why its giving me only one number and how I can fix it. Please and thank you.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%Plot frequency-amplitude resonce of system near half primary frequency%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
%%%Constants%%%
hbar = 1.055e-34; %J s
c = 2.998e8; %m/s Speed of light
eps = 8.854e-12; %C^2/N/m^2 permitivity of free space
q=.0005; %kg/(m*s)
%%%system parameters%%%
l = 200E-9; %m CNT length
Ri = .665E-9 ; %m Inner Radius
rho = 3.8E19; %kg/m^3 Material density (silicon)
E = 1.2e12; %Pa Youngs modulous
Q = 350 ; %Quality factor
V = 16; %V AC peak voltage
Ro=10^(-9); %outter radius
A = (Ro^2-Ri^2)*pi; %m^2 Cross sectional area
% I = W*h*h*h/12; %m^4 Cross sectional intertia
g=20E-9; % gap CNT plate
s=Ro/g; %
taylorexpansion;
wn = 3.51562; %s^-1 natural frequency
%%%Constants from modeshapes%%%(
g011 = 0.7830; % g011 = <1,phi_1>
g111 = 1; % g111 = <phi_1,phi_1>
g211 = 1.4778; % g211 = <phi_1^2, phi_1>
g311 = 2.3488; % g311 = <phi_1^3, phi_1>
%delta =electrostatic parameter
delta = .1902;
%This constant tracks effects of Fringing Correction to Elec. Force
%f = 0.65*g/W;
f = 0.26;
%Dimensionless damping coeff.
%b0*l^2/g*sqrt(1/(rho*A*E*I));
%b = wn/Q
b = 0.001;
q=.0005;
gamma1=[0.001:.001:.064,6.219:.001:6.283];
amp1= ((.5*b+ sqrt(b^2*.25-((delta^2*g011*g211*alpha2*sin(gamma1).^2)/(wn^2*g111^2*16))))*(wn*g111*16))/(2*sin(gamma1).*delta*g211*alpha2)

Respuesta aceptada

Guillaume
Guillaume el 10 de Oct. de 2014
The best way to find out where it's going wrong is to calculate each sub expression of your big formula one at a time and slowly expand. This way you would have found that
/(2*sin(gamma1).*...
should be
./(2*sin(gamma1).*...

Más respuestas (0)

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by