Effacer les filtres
Effacer les filtres

Problems with financial timetable

1 vue (au cours des 30 derniers jours)
Erik Nyström
Erik Nyström le 7 Mai 2018
What's wrong with this timetable? when i try bollinger(tt.Close) i get: Undefined function 'isnan' for input arguments of type 'cell'.
Error in bollinger (line 82) nnandata = data(~isnan(data));
when i try candle(tt.High,tt.Low,tt.Close,tt.Open,'b'); I get:
Error using vertcat Dimensions of matrices being concatenated are not consistent.
Error in candle (line 75) hilo = [hi'; lo'; nanpad];
This is the table, I can't find anything wrong but nothing works on it. tt= Date Open Close High Low __________________ _____________ _____________ ______________ _____________
07-May-2018 12:00:00 '9335.88000000' '9350.00000000' '9382.00000000' '9335.59000000'
07-May-2018 11:00:00 '9304.38000000' '9339.00000000' '9346.50000000' '9277.01000000'
07-May-2018 10:00:00 '9291.85000000' '9304.95000000' '9349.00000000' '9281.51000000'
07-May-2018 09:00:00 '9405.22000000' '9291.84000000' '9410.76000000' '9271.11000000'
07-May-2018 08:00:00 '9319.99000000' '9409.99000000' '9434.80000000' '9268.88000000'
07-May-2018 07:00:00 '9371.53000000' '9324.25000000' '9372.00000000' '9258.00000000'
07-May-2018 06:00:00 '9358.99000000' '9371.53000000' '9381.63000000' '9340.00000000'
07-May-2018 05:00:00 '9339.28000000' '9358.99000000' '9390.00000000' '9275.00000000'
07-May-2018 04:00:00 '9351.77000000' '9339.28000000' '9390.79000000' '9324.64000000'
07-May-2018 03:00:00 '9330.00000000' '9350.02000000' '9352.60000000' '9252.00000000'
07-May-2018 02:00:00 '9347.49000000' '9326.20000000' '9373.85000000' '9265.00000000'
07-May-2018 01:00:00 '9474.00000000' '9350.00000000' '9497.08000000' '9301.00000000'
07-May-2018 00:00:00 '9661.02000000' '9473.00000000' '9689.67000000' '9470.00000000'
06-May-2018 23:00:00 '9655.00000000' '9659.01000000' '9681.52000000' '9615.25000000'
06-May-2018 22:00:00 '9561.18000000' '9652.75000000' '9682.28000000' '9561.17000000'
06-May-2018 21:00:00 '9555.00000000' '9561.17000000' '9589.00000000' '9531.01000000'
06-May-2018 20:00:00 '9548.01000000' '9555.00000000' '9595.00000000' '9537.00000000'
06-May-2018 19:00:00 '9572.71000000' '9548.01000000' '9594.99000000' '9516.00000000'
06-May-2018 18:00:00 '9619.02000000' '9572.71000000' '9634.99000000' '9550.89000000'
06-May-2018 17:00:00 '9599.36000000' '9619.02000000' '9650.00000000' '9581.88000000'
06-May-2018 16:00:00 '9513.93000000' '9599.36000000' '9620.00000000' '9505.41000000'
06-May-2018 15:00:00 '9573.35000000' '9513.93000000' '9591.46000000' '9488.00000000'
06-May-2018 14:00:00 '9561.00000000' '9573.35000000' '9610.37000000' '9527.00000000'
06-May-2018 13:00:00 '9535.00000000' '9561.00000000' '9625.45000000' '9512.94000000'
06-May-2018 12:00:00 '9536.98000000' '9535.00000000' '9560.00000000' '9417.03000000'
06-May-2018 11:00:00 '9610.00000000' '9539.94000000' '9617.68000000' '9488.88000000'
06-May-2018 10:00:00 '9604.99000000' '9610.00000000' '9670.95000000' '9589.12000000'
06-May-2018 09:00:00 '9615.01000000' '9605.00000000' '9641.06000000' '9565.00000000'
06-May-2018 08:00:00 '9724.53000000' '9615.01000000' '9724.53000000' '9552.00000000'
06-May-2018 07:00:00 '9685.63000000' '9724.00000000' '9727.00000000' '9647.63000000'
06-May-2018 06:00:00 '9751.15000000' '9685.63000000' '9770.83000000' '9576.41000000'
06-May-2018 05:00:00 '9853.02000000' '9751.15000000' '9863.60000000' '9751.00000000'
06-May-2018 04:00:00 '9897.00000000' '9853.03000000' '9930.76000000' '9839.17000000'
06-May-2018 03:00:00 '9892.59000000' '9895.99000000' '9934.61000000' '9885.11000000'
06-May-2018 02:00:00 '9955.00000000' '9892.59000000' '9960.00000000' '9875.01000000'
06-May-2018 01:00:00 '9961.92000000' '9955.00000000' '9970.00000000' '9920.53000000'
06-May-2018 00:00:00 '9863.99000000' '9956.08000000' '9964.66000000' '9854.00000000'
05-May-2018 23:00:00 '9849.84000000' '9864.00000000' '9888.88000000' '9832.00000000'
05-May-2018 22:00:00 '9826.26000000' '9841.74000000' '9874.99000000' '9782.38000000'
05-May-2018 21:00:00 '9780.52000000' '9826.31000000' '9832.00000000' '9730.01000000'
05-May-2018 20:00:00 '9867.04000000' '9780.52000000' '9881.00000000' '9758.00000000'
05-May-2018 19:00:00 '9888.73000000' '9870.00000000' '9911.00000000' '9860.67000000'
05-May-2018 18:00:00 '9902.90000000' '9888.73000000' '9924.07000000' '9850.00000000'
05-May-2018 17:00:00 '9939.50000000' '9902.00000000' '9970.89000000' '9901.00000000'
05-May-2018 16:00:00 '9929.99000000' '9939.50000000' '9948.00000000' '9870.00000000'
05-May-2018 15:00:00 '9966.00000000' '9929.99000000' '9990.39000000' '9910.00000000'
05-May-2018 14:00:00 '9904.01000000' '9966.00000000' '9979.81000000' '9904.00000000'
05-May-2018 13:00:00 '9952.16000000' '9904.01000000' '10011.18000000' '9904.00000000'
05-May-2018 12:00:00 '9900.56000000' '9952.15000000' '10020.00000000' '9890.00000000'
05-May-2018 11:00:00 '9948.00000000' '9900.00000000' '9951.70000000' '9872.01000000'
05-May-2018 10:00:00 '9862.04000000' '9941.76000000' '9972.00000000' '9855.31000000'
05-May-2018 09:00:00 '9837.05000000' '9862.04000000' '9875.00000000' '9818.00000000'
05-May-2018 08:00:00 '9810.70000000' '9837.05000000' '9865.00000000' '9799.01000000'
05-May-2018 07:00:00 '9798.02000000' '9811.84000000' '9830.00000000' '9792.79000000'
05-May-2018 06:00:00 '9839.71000000' '9798.02000000' '9845.72000000' '9784.89000000'
05-May-2018 05:00:00 '9850.00000000' '9843.60000000' '9860.00000000' '9800.00000000'
05-May-2018 04:00:00 '9830.32000000' '9845.02000000' '9888.30000000' '9822.56000000'
05-May-2018 03:00:00 '9835.00000000' '9830.32000000' '9848.02000000' '9786.35000000'
05-May-2018 02:00:00 '9807.45000000' '9839.99000000' '9889.45000000' '9787.00000000'
05-May-2018 01:00:00 '9773.00000000' '9809.99000000' '9810.00000000' '9715.36000000'
05-May-2018 00:00:00 '9714.00000000' '9770.01000000' '9789.00000000' '9682.00000000'
04-May-2018 23:00:00 '9755.16000000' '9713.99000000' '9762.73000000' '9699.91000000'
04-May-2018 22:00:00 '9740.00000000' '9755.77000000' '9777.14000000' '9685.00000000'
04-May-2018 21:00:00 '9705.10000000' '9748.75000000' '9760.00000000' '9691.00000000'
04-May-2018 20:00:00 '9671.23000000' '9710.46000000' '9730.00000000' '9655.00000000'
04-May-2018 19:00:00 '9649.95000000' '9671.23000000' '9685.00000000' '9631.03000000'
04-May-2018 18:00:00 '9664.90000000' '9649.97000000' '9670.00000000' '9615.92000000'
04-May-2018 17:00:00 '9675.01000000' '9665.00000000' '9711.00000000' '9643.06000000'
04-May-2018 16:00:00 '9614.67000000' '9677.00000000' '9679.00000000' '9575.00000000'
04-May-2018 15:00:00 '9706.00000000' '9614.67000000' '9709.99000000' '9570.10000000'
04-May-2018 14:00:00 '9654.81000000' '9706.00000000' '9716.35000000' '9634.00000000'
04-May-2018 13:00:00 '9717.99000000' '9654.81000000' '9750.33000000' '9632.00000000'
04-May-2018 12:00:00 '9760.33000000' '9717.00000000' '9789.30000000' '9691.80000000'
04-May-2018 11:00:00 '9711.00000000' '9765.00000000' '9805.44000000' '9656.01000000'
04-May-2018 10:00:00 '9761.64000000' '9711.00000000' '9780.00000000' '9701.69000000'
04-May-2018 09:00:00 '9798.50000000' '9761.64000000' '9816.76000000' '9670.00000000'
04-May-2018 08:00:00 '9697.98000000' '9798.50000000' '9830.04000000' '9690.13000000'
04-May-2018 07:00:00 '9685.02000000' '9697.99000000' '9733.00000000' '9665.00000000'
04-May-2018 06:00:00 '9635.39000000' '9689.00000000' '9728.00000000' '9605.00000000'
04-May-2018 05:00:00 '9638.52000000' '9635.10000000' '9645.23000000' '9610.51000000'
04-May-2018 04:00:00 '9580.00000000' '9638.52000000' '9650.03000000' '9572.00000000'
04-May-2018 03:00:00 '9649.56000000' '9580.00000000' '9659.00000000' '9540.00000000'
04-May-2018 02:00:00 '9623.98000000' '9649.12000000' '9679.00000000' '9600.00000000'
04-May-2018 01:00:00 '9604.85000000' '9615.97000000' '9689.76000000' '9593.89000000'
04-May-2018 00:00:00 '9750.00000000' '9599.00000000' '9750.00000000' '9520.85000000'
03-May-2018 23:00:00 '9724.01000000' '9750.00000000' '9844.00000000' '9711.22000000'
03-May-2018 22:00:00 '9682.00000000' '9724.01000000' '9735.00000000' '9641.44000000'
03-May-2018 21:00:00 '9683.39000000' '9678.00000000' '9697.00000000' '9661.42000000'
03-May-2018 20:00:00 '9670.00000000' '9682.00000000' '9698.86000000' '9614.01000000'
03-May-2018 19:00:00 '9690.00000000' '9666.01000000' '9734.99000000' '9620.93000000'
03-May-2018 18:00:00 '9715.00000000' '9684.99000000' '9779.00000000' '9620.00000000'
03-May-2018 17:00:00 '9613.00000000' '9711.16000000' '9718.00000000' '9551.00000000'
03-May-2018 16:00:00 '9442.00000000' '9613.12000000' '9613.12000000' '9428.38000000'
03-May-2018 15:00:00 '9457.99000000' '9442.28000000' '9480.40000000' '9406.91000000'
03-May-2018 14:00:00 '9475.00000000' '9458.00000000' '9490.60000000' '9412.00000000'
03-May-2018 13:00:00 '9320.00000000' '9471.05000000' '9475.00000000' '9294.00000000'
03-May-2018 12:00:00 '9220.00000000' '9320.00000000' '9349.99000000' '9207.39000000'
03-May-2018 11:00:00 '9231.00000000' '9224.75000000' '9235.91000000' '9188.66000000'
03-May-2018 10:00:00 '9211.54000000' '9235.38000000' '9236.06000000' '9197.12000000'
03-May-2018 09:00:00 '9238.19000000' '9208.33000000' '9240.00000000' '9170.00000000'

Réponse acceptée

Stephan
Stephan le 7 Mai 2018
Modifié(e) : Stephan le 7 Mai 2018
Hi,
the numbers in your table are not numbers for matlab.
'9350.00'
is not the same like
9350.00
- the first will be treated like a string, so you try to calculate something like
Bollinger ('strawberry')
That wont work...
Change this to data type double and then you are fine.
Helpful will be:
combined with:
Best regards
Stephan

Plus de réponses (1)

Peter Perkins
Peter Perkins le 14 Mai 2018
You don't say how you got this table, but likely you read a file that has non-numeric junk in some fields on some rows, and that's causing readtable to turn everything into text. You probably want to find that root cause.

Catégories

En savoir plus sur Time Series Objects dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by