MATLAB Answers

How can I write a loop, which can make the parameter "V" change with a cyclic variable "i"?

1 view (last 30 days)
Zhenyu Wu
Zhenyu Wu on 29 Jan 2020
Commented: Zhenyu Wu on 29 Jan 2020
My code is:
netlist = ['D:\1\MATLAB\mine.txt'];
code =['D:\\1\\MATLAB\\mine.asc\r\n'...
'R1 N001 0 {R}\r\n'...
'C1 N001 0 {C}\r\n'...
'V1 N001 0 {V}\r\n'...
'.tran .1\r\n'...
'.params R = 1000 C = 0.001 V = 15\r\n'...
'.backanno\r\n'...
'.end\r\n'];
fid = fopen(netlist,'w+');
fprintf(fid,code);
fid = fclose(fid);
I have to make the parameter "V" change with a cyclic variable "i". Is there any way to do that?

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

Products


Release

R2016a

Translated by