Hi all!
I was searching the web and the documentation, and I couldn't find any solution to my problem. There maybe another method that solves my problem instead of vpasolve, but that one was the closest I could find. So maybe I'm just doing it wrong or vpasolve is not capable of solving my equation. I'd appreciate any help.
So here's my problem:
I have a cubic spline created with spap2 which I use to approximate data. There's an angle to every point of my function, just like polar coordinates. Out of the spline-function I want to create an array with x, y and phi (angle to y-axis), but I need the angles to have a linear spacing. (Something like pi/1000)
So I've been thinking of writing my own method, that just approximates every value for every angle, but that takes a lot of computing time for a thousand angles.
I've tried so far:
syms x;eqn = .25 == x / ppval(SPL, x);solx = vpasolve(eqn, x);
With .25 being tan(pi/4), just to test one angle, and SPL being the spline-function. I'm planning to put this in a loop and then calculate y with ppval to every new x (out of solx).
The error I get:
Error using histcFirst Input must be a real non-sparse numeric array.Error in ppvalif lx, [~,index] = histc(xs,[-inf,b(2:l),inf]);
I assume that vpasolve can't handle the SPL-function… But I'm not sure.
Thank you! Felix
Best Answer