I am creating a vector but its throwing some error. Example I create vector a= [3.4 -4.90 0.23], and when I access it a it gives error.
1 view (last 30 days)
Show older comments
Samriddhi Kumari on 7 Jun 2021
Commented: Shivani Dixit on 7 Jun 2021
In MATLAB, we access the elements of an array using paranthesis () and not square brackets [ ]. You can see an example below :
arr =[3.4 -4.90 0.23];
arr(1)=3.4 % using arr would lead to error as in your case
Yeah , great . We are allowed to put our independent views on the question.
More Answers (1)
You should not use square braces.. a not allowed.
a= [3.4 -4.90 0.23] ;
Find more on Matched Filter and Ambiguity Function 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!