Problem in using coeffs in a file
古いコメントを表示
I am using Matlab mobile (Android), version 4.2.0.
I am creating a function, in which I am using the coeffs function. I want to extract the coefficients of x and y from an expression and use them elsewhere.
Say, my expression is x - y. If I use coeffs function in the command line, I get back an array, which is what I want. The code has been attached in the screenshot.
The command line gives me just what I want. But when I try do do the same from a file, an error comes up. See the other screenshot attached. In the second screenshot, plot2d is the function I have written, and eqn2 is the expression in which I want to find the coefficients of x and y. The line in the function is simply:
coeffs(eqn2,x)
I must add here that if I put the coeffs function in a different file and call that file, it works fine.
Any help is appreciated.
5 件のコメント
Walter Roberson
2018 年 8 月 1 日
Please show your code for plot2d
Wrichik Basu
2018 年 8 月 1 日
Kevin Chng
2018 年 8 月 2 日
What is the errors you found? Have a nice day.
Wrichik Basu
2018 年 8 月 2 日
Kevin Chng
2018 年 8 月 3 日
Okay. great.....thanks for your sharing
回答 (1 件)
Kevin Chng
2018 年 8 月 1 日
0 投票
Hi Wrichik Basu,
Do you mind to share your equation 2 here? Your error could be similar to case as below:
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!