本文介绍了请给我把Matlab代码转换成Visual Basic代码形式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我需要您的帮助才能将Matlab代码转换为可视代码.我是这个主题的新手,转换对我来说非常重要.预先感谢您,等待您的帮助.
Matlab代码在这里;

clc,清除所有
x = 0:0.2:1; %获取实数类型的维数组

fid = fopen(''dene3.txt'',``w'';); %请写描述
对于我= 1:6
fprintf(fid,''%8.5f \ n'',1.87 * x(i)); %请写描述
结束
fclose(fid); %请写描述

fid = fopen(''dene4.txt'',``w''); %请写描述
对于我= 1:6
fprintf(fid,''%7d \ n'',12 * i); %请写描述
结束
fclose(fid); %请写描述

clc,清除所有
ax = zeros(1,6);
fid = fopen(''dene3.txt''); %请写描述
对于我= 1:6
ax(i)= fscanf(fid,''%f'',1)%请写说明
fclose(fid); %请写描述

ay = zeros(1,6);
fid = fopen(''dene4.txt'');
对于我= 1:6
ay(i)= fscanf(fid,''%d'',1)
结束
fclose(fid);

Hi, I need your help to translate the matlab code in visual code. I''m new on this subject, and the conversion is very important to me. Thank you in advance, Waiting for your help.
Matlab Code is here;

clc,clear all
x = 0: 0.2 :1; %get a dimensional array of real number type

fid = fopen(''dene3.txt'',''w'';); % Please write description
for i=1:6
fprintf(fid,''%8.5f\n'',1.87*x(i)); % Please write description
end
fclose(fid); % Please write description

fid = fopen(''dene4.txt'',''w''); % Please write description
for i=1:6
fprintf(fid,''%7d\n'',12*i); % Please write description
end
fclose(fid); % Please write description

clc,clear all
ax=zeros(1,6);
fid = fopen(''dene3.txt''); % Please write description
for i=1:6
ax(i)=fscanf(fid,''%f'',1) % Please write description
fclose(fid); % Please write description

ay=zeros(1,6);
fid = fopen(''dene4.txt'');
for i=1:6
ay(i)=fscanf(fid,''%d'',1)
end
fclose(fid);

推荐答案



这篇关于请给我把Matlab代码转换成Visual Basic代码形式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 23:24