can I adjusting one vector according to another vector for plotting?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I have this matrix for example like this:
Matrix M=
2 4 1 4 6
2 5 NaN 8 1
4 NaN 9 NaN NaN
9 6 NaN NaN 7
And vector T=
1
2
3
4
I am trying to plot vector T on the x-axis with every row column of matrix M on the y-axis. This works fine the plot aoutoatically ignore the points with NaN.
The problem is I would also like to use polyfit, to get a fitting equation. But Polyfit is does not skip NaN values, which gives only NaN as coefficients. Please note that I the matrix M is orignally a much larger matrix same as vector T is much larger. These are just examples for my point.
My question is is there a another way to get the equation of a fitted line fo every coumn vs vector T.
Example, the option in the graph tools> basic fitting works great, but this is manual. I need to output the fitting equations for large matriceis in a for loop and store them.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!