Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:33:19+00:00 2026-06-14T19:33:19+00:00

fid=fopen(‘transform.txt’); alltext = textscan(fid, ‘%s’); d = size(alltext) for k=1:1 line = alltext{1}{k} end

  • 0
fid=fopen('transform.txt');
alltext = textscan(fid, '%s');

d = size(alltext)

for k=1:1
    line = alltext{1}{k}
end

I am using size() function to get the number of cells but it is not giving me my desired Answer….I want the number of cells in array variable named alltext

Transform.txt File

mecca06.pgm
2
0.707 -0.1414 0 0.707 1.2726 0 0 0 1
mecca06.pgm
c

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:33:20+00:00Added an answer on June 14, 2026 at 7:33 pm

    If textscan finds strings it returns a cell array of one or multiple cell arrays. The number of specifiers (in your case %s) you search for defines the number of nested cell arrays it returns.
    Most primitive solution for your case, where you only search for %s would be:

     d = size(alltext{1});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using fid = fopen('fgfg.txt'); to open a file. Sometimes an error occurs
I have a loop like this: for i=1:no %some calculations fid = fopen('c:\\out.txt','wt'); %write
I use the line below to get thumbnail: bitmap = MediaStore.Images.Thumbnails.getThumbnail(act.getApplicationContext().getContentResolver(), fid, MediaStore.Images.Thumbnails.MICRO_KIND, null);
fid = fopen('data/data_file.csv'); all_messages = textscan(fid, format, 'delimiter', ','); Returns: error: 'textscan' undefined How
function [org_data] = file_manipulation(in_fname, txt_fname, mat_fname) org_data = round(load(in_fname)); fid = fopen(txt_fname,'wt+'); student_id =
how to get the fId of the selected fname? Here's my code.. var fS
Here is my code: if __name__ == '__main__': fid = open ('200502.txt') data =
I'm using a MYSQL database. I have the following: tbl1 ID(p) | FID(p) 1
I'm using fmemopen to create a variable FILE* fid to pass it to a
I want to get the user's FID, Email and Name after login with Javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.