From the documentation of sind:

For integers n, sind(n*180) is exactly zero, whereas sin(n*pi) reflects the accuracy of the floating point value of pi.

So, if you are extremely troubled with the fact that sin( pi ) is not precisly zero, go ahead and use sind, but in practice it is just a wrap-around sin so you actually add a tini-tiny bit of overhead.

Personally, I prefer the elegance of radians and use sin.

Answer from Shai on Stack Overflow
Discussions

how do you use sin in matlab?
how do you use sin in matlab?. Learn more about sin More on mathworks.com
🌐 mathworks.com
2
1
August 14, 2011
How to type sin function with square
How to type sin function with square. Learn more about syntax, basic, sinsquare More on mathworks.com
🌐 mathworks.com
2
0
November 20, 2023
degrees - MATLAB sin() vs sind() - Stack Overflow
Personally, I prefer the elegance of radians and use sin. ... Sign up to request clarification or add additional context in comments. ... I fear that kids that use MATLAB in highschool won't survive to graduation. More on stackoverflow.com
🌐 stackoverflow.com
Plotting sin function in matlab
Yes, it is not a sine wave, it shouldn't be. When you add multiple sine waves you get random things, based on how much you add and in what proportion. For eg. Try doing this: for k = 1:N S = S + (1/k)*sin(2pi Fkt) end This will give you triangles. If you do : for k = 1:2:N in the above code, it will be a square wave. But in case of what was asked in the problem, you're supposed to get two impulse in each cycle, with nothing in the middle. The more you increase N, the closer it is to the expected plot as all these are applicable for summation upto infinity. For smaller N, you'll get some disturbance in the middle as it is just an approximate. They are not smaller sine waves, they are just some excess wave that should get eliminated as you increase N. More on reddit.com
🌐 r/ECE
14
10
August 14, 2021
🌐
MathWorks
mathworks.com › matlabcentral › answers › 13679-how-do-you-use-sin-in-matlab
how do you use sin in matlab? - MATLAB Answers - MATLAB Central
August 14, 2011 - Use sin(30). Sign in to comment. ... You need parentheses. For example: ... MATLAB has sind for those who insist on degrees.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 2049652-how-to-type-sin-function-with-square
How to type sin function with square - MATLAB Answers - MATLAB Central
November 20, 2023 - While the usual mathematical notation to compute the square of the sine of x is , the MATLAB code to perform that computation is sin(x)^2 (or, since you likely want to compute the square of the sine element-wise, sin(x).^2).
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › trigonometry
asin - Inverse sine in radians - MATLAB
This MATLAB function returns the Inverse Sine (sin-1) of the elements of X in radians.
Find elsewhere
🌐
Reddit
reddit.com › r/ece › plotting sin function in matlab
r/ECE on Reddit: Plotting sin function in matlab
August 14, 2021 -

So I don't know if what I did is correct or what but it does output something. I'm thinking that it's wrong since it doesn't have the "k" that's supposed to be in the equation.

Can someone help me? I know this is just the basics but we're just starting out and I'm already lost on how to do this

the problem my code
🌐
YouTube
youtube.com › watch
How to plot sine wave in matlab | Matlab for beginners | MATLAB TUTORIAL - YouTube
How to plot sine wave in matlab or how to generate sine wave in matlab is a matlab beginners’ tutorial. The initial section of the video explains how to writ...
Published   January 2, 2023
🌐
Johns Hopkins University
math.jhu.edu › ~shiffman › 370 › help › techdoc › ref › sin.html
sin, sinh (MATLAB Function Reference)
Description The sin and sinh commands operate element-wise on arrays. The functions' domains and ranges include complex values. All angles are in radians. Y = sin(X) returns the circular sine of the elements of X.
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › trigonometry
sinpi - Compute sin(X*pi) accurately - MATLAB
Y = sinpi(X) computes sin(X*pi) without explicitly computing X*pi. This calculation is more accurate than sin(X*pi) because the floating-point value of pi is an approximation of π.
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math
Trigonometry - MATLAB & Simulink
Sine, cosine, and related functions, with results in radians or degrees · The trigonometric functions in MATLAB® calculate standard trigonometric values in radians or degrees, hyperbolic trigonometric values in radians, and inverse variants of each function.
🌐
TutorialsPoint
tutorialspoint.com › matlab › matlab_plot_sine_wave.htm
MATLAB - Plot Sine Wave
The x-axis represents time in seconds, and the y-axis represents the amplitude of the sine wave. When you execute the code the output is as follows − · The ezplot() function in MATLAB is used to plot implicit and explicit equations in 2D. It is particularly useful for visualizing mathematical expressions without the need to explicitly define a function.