Conversion to double from struct is not possible.
조회 수: 11 (최근 30일)
이전 댓글 표시
{
x=0:0.01:2*pi;
y=sin(x);
figure;
plot(x,y,'r');
xlim([0 2*pi]);
ax=gca;
set(ax,'xtick',[0 pi 2*pi],'xticklabel',{'0','1','2'});
set(ax,'ytick',-1:.5:1);
}
it says error using 'set', wondering what's the mistake
댓글 수: 1
답변 (4개)
Image Analyst
2017년 10월 22일
I don't think you can enclose a block of 8 lines in braces like you did. With them in there I get a different error message than you did. If I take them out, I get no error message at all.
Also, you can use xticks() and yticks() and xticklabels() and yticklabels() instead of set() if you have R2016b version of MATLAB or later.
댓글 수: 1
Massimo Lucia
2020년 5월 5일
Can you please help me with this error message?
Conversion to double from struct is not possible.
Error in STABLE (line 79)
qs(i,:) = qSol;
Find attached the STABLE.m
댓글 수: 2
Image Analyst
2020년 5월 5일
Start a new question with this. In the meantime, put this on it's own line just before that line 79 and see what fields get listed in the command window:
qSol % Don't use a semicolon!
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!