Error inserting symbolic expression in for-loop
Show older comments
A have some expressions outside a loop and want to use them inside the loop like
p=P(i,j) %some expressions that must be calculated outside the loop
q=Q(i,j) %some expressions that must be calculated outside the loop
for i=1:10
for j=1:10
W(i,j)=P+i+j
V(i,j)=Q+i-j
end
end
i keep recieving this error:
The following error occurred converting from sym to double:
Unable to convert expression into double array.
1 Comment
Rik
on 25 Jan 2019
What are the classes and sizes of the variables you're using? And what are you trying to achieve as a result?
Accepted Answer
More Answers (0)
Categories
Find more on Conversion 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!