Why does Isreal function give wrong answer after using collect function
조회 수: 1 (최근 30일)
이전 댓글 표시
In the code below, the second function isreal gives wrong answer after using collect function.
clear all;
close all;
clc;
syms w real;
m=w^3-1i*w^2+2*w-1i;
mre=real(m)
isreal(mre)
mrecol=collect(real(m),w)
isreal(mrecol)
댓글 수: 0
채택된 답변
Walter Roberson
2013년 3월 28일
There is no isreal() function for sym specifically, so the result of both isreal() calls is undefined. But double check class(mre) and class(mrecol)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Special Values에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!