フィルターのクリア

I can only publish half of my script

1 回表示 (過去 30 日間)
Annah
Annah 2024 年 2 月 8 日
回答済み: Austin M. Weber 2024 年 2 月 8 日
When I try to publish my script into PDF format, the pop up window only displays half of my code. Its worth noting that I am using the online version in safari. Heres my code:
% Project 1: Matrices and Arrays
% 1. Enter matrices A and B
A = [1 2 3; 4 5 6; 7 8 9];
B = magic(3);
% 2. Find sum(A)
sum_A = sum(A);
% 3. Find the transpose of A
A_transpose = A';
% 4. Find diag(A)
diag_A = diag(A);
% 5. Find sum(diag(A))
sum_diag_A = sum(diag(A));
% 6. Find A(1,2)+A(2,1)+A(3,3)
result_6 = A(1,2) + A(2,1) + A(3,3);
% 7. Use colon operator to find a row vector containing numbers between 1 and 10 with an increment of 0.5
vector_1_to_10 = 1:0.5:10;
% For Expressions:
% 8. Allocate the value of 3 to a variable named x
x = 3;
% 9. Find the value of y=(x+1)*tan(x)
y = (x + 1) * tan(x);
% 10. Find x+y
x_plus_y = x + y;
% 11. Find x/y
x_divided_by_y = x / y;
% 12. Find x^2
x_squared = x^2;
% 13. Find abs(-x)
absolute_x = abs(-x);
% 14. Find sqrt(x)
square_root_x = sqrt(x);
% 15. Find sin(1/x)
sin_1_over_x = sin(1/x);
% 16. Find sinh(x)
sinh_x = sinh(x);
% 17. Find abs(x+4i)
absolute_x_plus_4i = abs(x + 4i);
% For Working with Matrices:
% 18. Find zeros(2,3)
zeros_matrix = zeros(2, 3);
% 19. Find ones(3,5)
ones_matrix = ones(3, 5);
% 20. Find rand(3,3)
random_matrix = rand(3, 3);
% 21. Concatenate C=[A B A+B]
C = [A B A+B];
% 22. Find a matrix D which is matrix A in which you delete the second column
D = A(:, [1,3]);

回答 (1 件)

Austin M. Weber
Austin M. Weber 2024 年 2 月 8 日
It may be an issue with your browser. I just tried publishing your code to a PDF using Microsoft Edge and it seems to have worked. See the attached file.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by