Error, Index in position 2 exceeds array bounds!!

6 vues (au cours des 30 derniers jours)
zainab malik
zainab malik le 14 Sep 2018
Commenté : Walter Roberson le 14 Nov 2018
When I start loading my text file I get this error how to resolve? the text file is attached. And I am getting this error :
Index in position 2 exceeds array bounds.
Error in damping (line 12) freq=dm(:,1);
close all
clear all
% LOAD DATA OBTAINED FROM FEA ANALYSIS load Sp.txt; dm= Sp; freq=dm(:,1); amp=dm(:,2);
  1 commentaire
Walter Roberson
Walter Roberson le 15 Sep 2018
Please do not close questions that have an Answer

Connectez-vous pour commenter.

Réponse acceptée

Adam Danz
Adam Danz le 14 Sep 2018
My bet is that dm is empty which would imply either that your Sp.txt document is empty or it's not loading correctly.
dm = [];
dm(:,1)
Index in position 2 exceeds array bounds.
  7 commentaires
zainab malik
zainab malik le 14 Sep 2018
Thank you sooooooo much. May be when i converted data from excel file to txt file at that time i used a wrong .txt type. Thats why it was not working I used Unicode.txt. Thanku very much :)
Walter Roberson
Walter Roberson le 14 Nov 2018
Sorry, just noticed the content of the question now. The original file is in UTF 16 Little Endian encoding.
You can use my csv2table from This Posting . You will need both files I posted there.

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by