필터 지우기
필터 지우기

I am getting some problem in assigning a value to another value

조회 수: 2 (최근 30일)
vetri veeran
vetri veeran 2015년 6월 12일
편집: per isakson 2015년 6월 12일
clc;
clear all;
close all;
w=1;
i=1;
M1=2e6;
M2=2e9;
for t=0:0.0001:2*pi
v(i)=2*sin(w*t);
I1(i)=v(i)/M1;
I2(i)=v(i)/M2;
if (v(i)>1.5)
[v(i)/I1(i)]:=[v(i)/I2(i)];
v(i)=v(i)+0.0001;
M22(i)=(v(i)/I2(i));
elseif (v(i)>2)
v(i)=v(i)-0.0001;
M22(i)=(v(i)/I2(i));
elseif (v(i)<-1.5)
[v(i)/I2(i)]:=[v(i)/I1(i)];
v(i)=v(i)-0.0001;
M11(i)=(v(i)/I1(i));
elseif (v(i)>2)
v(i)=v(i)+0.0001;
M11(i)=(v(i)/I1(i));
else
i=i+1;
end
M22(i)=M2;
end
t=0:0.0001:2*pi;
figure;
plot(v,I1);
hold on;
plot(v,I2);
  댓글 수: 1
per isakson
per isakson 2015년 6월 12일
편집: per isakson 2015년 6월 12일
  • "problem in assigning a value to another value" &nbsp values are assigned to variables
  • [v(i)/I1(i)]:=[v(i)/I2(i)]; doesn't adhere to the Matlab syntax

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by