how can I use fprint?

댓글 수: 6

Steven Lord
Steven Lord 2017년 4월 18일
If you post what you've done to try to solve this problem and ask a specific question you may receive some suggestions about how to move forward.
James Tursa
James Tursa 2017년 4월 18일
What have you done so far? What specific problems are you having with your code? Do you know how to get input from the keyboard? (doc input) Do you know how to generate random angles? (doc rand)
Lion Sullivan
Lion Sullivan 2017년 4월 19일
I dont have any specific question,please answer it.I have to find the solutşon quickly,time is running.
Walter Roberson
Walter Roberson 2017년 4월 19일
The quickest way to get an answer is to show what you have accomplished so far, and ask a specific question about the step you do not understand after that.
Stephen23
Stephen23 2017년 4월 19일
편집: Stephen23 2017년 4월 19일
"I have to solve this problem with fprintf,sprintf"
That's great! Go for it! If you have any specific questions, please ask us. You already listed some functions that you need to use, so you will have no problems locating their documentation using your favorite internet search engine, trying their examples, and attempting to solve this yourself. Good luck and have fun!

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

 채택된 답변

jJnte
jJnte 2017년 4월 19일
편집: jJnte 2017년 4월 19일

0 개 추천

I suggest you try and practice instead of going to forums directly. Play around with this code a bit and get familiar with it and really try to understand how and why it works.
ang = pi*rand(1,20);
A = 1; B = 1; % Choose A and B
y = A.*cos(ang)./(B.*sin(ang));
z = [ang; y];
fid = fopen('yournamesurname.txt', 'wt');
fprintf(fid, '%f\t\t%f\n', z);
fclose(fid);

댓글 수: 1

Stephen23
Stephen23 2017년 4월 19일
And remember these two things:
  1. this is a public forum, so your tutor/professor can read this as well.
  2. submitting someone else's work as your own is called plagiarism.

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

추가 답변 (1개)

jJnte
jJnte 2017년 4월 19일

0 개 추천

You know, you shouldn't edit your whole thread for a new question...
My advice to you is to use the help command. Example:
>> help fprintf
And with this I bid you farewell

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

질문:

2017년 4월 18일

답변:

2017년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by