Fibonacci Recursion Value tracer
问题 So I need to write a program which uses a recursive function to store the value of input arguments in the order they were made. e.g. If my function is [f trace]=fibo_trace(6,[]) it should return [f trace]=fibo_trace(6,[]) f= 8 trace= 6 4 2 3 1 2 5 3 1 2 4 2 3 1 2 With trace being the values with which the recursive call is being initialized and f being the 6th element in the fibonacci series. Here is my code function [f,trace] = fibo_trace(n,v) persistent ptrace; % must specify persistent v=n