summation without using any loop algorithm
Show older comments
Hello,
I am trying to implement the summation for a square wave without the use of loops. I have the following code:

sona = sin((2*k - 1)'*t)./(2*k - 1);
but keep getting the error: "Error using * Inner matrix dimensions must agree"
Can you please explain what the problem is and how I can fix this error?
Thanks, monkey_matlab
2 Comments
Geoff Hayes
on 24 May 2015
monkey_matlab - how have you defined k and t?
monkey_matlab
on 24 May 2015
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!