Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = [];
- i = 1;
- dlmwrite('data3.txt', f, '\t');
- for x=-4:0.1:4
- if (x >= 2)
- y = 3*x^2+7;
- else
- if (x > -2)
- y = tan(x^2);
- else
- y = (x+3)/(x^2+5);
- end
- end
- f(i) = y;
- dlmwrite('data3.txt', f(i), '-append');
- i = i + 1;
- end
- dlmread('data3.txt', '\n');
- dlmwrite('dataMy.txt', rand(3), '-append');
Advertisement
Add Comment
Please, Sign In to add comment