How can I search condition in other files?

Hello,
I'm new in matlab and I really dont know how to write a code yet. My problem is: I have 3 differents files and I want to search for some conditions in this 3 files. The files as the sames size. So for exemple I have the 3 files like x= (:,:), y=(:,:) and z=(:,:). Now i need to create a new file A with exactely the same size as the other 3 and usinf some function if to apply some conditions. My big problem is that I dont know How to write a code to create this new file and then apply the if conditions.
Can you please help me?

1 Comment

What kind of file are you talking about? A .mat file or an arbitrary format binary or text file containing data?
Either way you would need to read the files into Matlab matrices then applying your condition would be easy and you can then save back to the format you read from.
Functions like textscan, fread, fscanf can be used to read data in a specified format from a text or binary file.
If you have a .mat file then just load and save commands will work

Answers (0)

This question is closed.

Tags

Asked:

on 14 Aug 2014

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!