A blog to help electrical engineers and students to learn electrical engineering topics. Basic Electrical Engineering, Power Systems, Electrical Machines, tec.. Now special course on MATLAB for Beginners.

Class

Class

Thursday, May 26, 2016

Working with Files in MATLAB - Part 1



In this post we will discuss some basic functions to work with external files using MATLAB. Matlab can interact with many popular file fromats. The common file formats are Excel® spread sheets, text, images, audio and video, XML documents and scientific data formats. In addition to the functions to directly work with these file format, there are low-level file I/O functions which work with data files in any format. Open( ) - Open the files...

Tuesday, May 17, 2016

Data Display and Output Commands in MATLAB



disp( ) 'disp' is the basic command used to display value of a variable or a string. It can display value of only one variable or a string at a time. It can’t display multiple values in single command. Syntax disp(A) disp(A) displays the value of variable A without printing the variable name. The argument can be a string, a numeric or an expression. If the variable contains an empty array, returns without displaying anything. Examples >> A...

Tuesday, May 10, 2016

Basic Data Input Commands in MATLAB



We have discussed about different types of variables in Matlab and different ways to assign data to them. Now we will discuss how to display the data stored in the variable to the command window or save it to a file.  input Input is the simple basic command to request the user input. It displays a prompt text for the user to understand what data to be entered and waits for the user to input a value and press the Return key. The user can...