Best MATLAB Alternatives

Shirjeel Yunus
Updated on 04-Oct-2023 12:57:27

657 Views

What is MATLAB? MATLAB is a programming language where you can write programs for math, computation, etc. The platform comes with its own integrated development environment and a huge collection of libraries. The language can be used with different types of paradigms as it is a language of the fourth generation. There are many inbuilt functions which can be used for calculations which include linear algebra, quadrate, signal processing, and many more. Why MATLAB Alternatives? MATLAB execution time is slow as it is an interpreted language MATLAB is a costly software in comparison to other platforms like C, C++, ... Read More

Subtract Days from a Date in JavaScript

Abhishek
Updated on 04-Oct-2023 12:55:19

37K+ Views

In this tutorial, we will learn how to subtract days from a date in JavaScript. To subtract days from a JavaScript Date object, use the setDate() method. Under that, get the current days and subtract days. JavaScript date setDate() method sets the day of the month for a specified date according to local time. Following are the methods we can use to subtract days from a date in JavaScript βˆ’ Using the setTime() and getTime() methods Using the setDate() and getDate() methods ... Read More

Top 10 JSFiddle Alternatives

Shirjeel Yunus
Updated on 04-Oct-2023 12:54:21

374 Views

What is JSFiddle? JSFiddle is a web development environment where you can run codes written in HTML, CSS, and JavaScript. These codes are known as fiddles. You can use JavaScript libraries to write code and make a useful application. JSFiddle also helps to add codes to a blog. There’s no need to register for a free account The main window is divided into three parts. In the first part, you can write HTML, second part CSS, and third part JavaScript. The syntax is color-coded so it is easy to detect errors. Why JSFiddle Alternatives? You have to click the ... Read More

Modelling Steady Flow Energy Equation in Python

Dr Pankaj Dumka
Updated on 04-Oct-2023 12:44:00

253 Views

Steady Flow Energy Equation (SFEE) is the application of conservation of energy on to an open system. Figure shown below is a schematic of open system in which fluid enters at 𝑖 and exits at 𝑒. The red broken line represents the control surface (CS) of the control volume (CV). The inlet and exit parameters are mentioned in the table shown below βˆ’ Parameter Inlet Exit Pressure pi pe Velocity Vi Ve Density Pi Pe Specific volume vi ve Enthalpy hi he Area Ai Ae ... Read More

Modeling Simpson's Rule for Numerical Integration in Python

Dr Pankaj Dumka
Updated on 04-Oct-2023 12:41:38

1K+ Views

Simpson's rule is a very powerful tool to perform numerical integration. To maximise accuracy while requiring fewer divisions, Simpson's rules calculate the integrals using weighting factors. The trapezoidal rule only considers two points, π‘₯𝑖 and π‘₯𝑖+1, to estimate a trapezoid's area, but Simpson's rules use more than two points (or many strips) in each round (refer figure shown below). The values of 𝑓(π‘₯) at the various points are updated by weighing various criteria in order to decrease the error Simpson’s 1/3 Rule This approach calculates the area of two strips simultaneously, so three different values of "x" are taken ... Read More

Static Variables in Java

Paul Richard
Updated on 04-Oct-2023 12:40:34

27K+ Views

Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. There would only be one copy of each class variable per class, regardless of how many objects are created from it. Static variables are rarely used other than being declared as constants. Constants are variables that are declared as public/private, final, and static. Constant variables never change from ... Read More

PHP Objects

Malhar Lathkar
Updated on 04-Oct-2023 12:31:17

32K+ Views

Definition and Usage In PHP, Object is a compound data type (along with arrays). Values of more than one types can be stored together in a single variable. Object is an instance of either a built-in or user defined class. In addition to properties, class defines functionality associated with data. Primary (scalar) variables, arrays and other objects can be cast to object data type using casting operator. PHP provides stdClass as a generic empty class which is useful for adding properties dynamically and casting. Syntax To declare an object of a class we need to use new statement class myclass ... Read More

Standard Header Files in C

George John
Updated on 04-Oct-2023 12:26:13

26K+ Views

In C language, header files contain the set of predefined standard library functions. The "#include" preprocessing directive is used to include the header files with ".h" extension in the program. Here is the table that displays some of the header files in C language, Sr.No. Header Files & Description 1 stdio.hInput/Output ... Read More

C++ Program to Append an Element into an Array

Arnab Chakraborty
Updated on 04-Oct-2023 12:16:39

49K+ Views

An array is a linear sequential data structure to hold homogeneous data in consecutive memory locations. Like other data structures, an array also must-have features to insert, delete, traverse and update elements in some efficient way. In C++, our arrays are static. There are a few dynamic array structures also available in C++. For a static array, there may be a Z number of elements that can be stored inside that array. And till now we have n elements into it. In this article, we will see how to insert an element at the end of an array (which is ... Read More

Modeling Two-Dimensional Heat Conduction Problem Using Python

Dr Pankaj Dumka
Updated on 04-Oct-2023 11:28:48

3K+ Views

In this tutorial, we will see how to model 2D heat conduction equation using Python. A 2D, steady, heat conduction equation with heat generation can be written in Cartesian coordinates as follows βˆ’ $$\mathrm{\triangledown^{2} T \: + \: \frac{q_{g}}{k} \: = \: \frac{\partial^{2}T}{\partial x^{2}} \: + \: \frac{\partial^{2}T}{\partial y^{2}} \: + \: \frac{q_{g}}{k} \: = \: 0 \:\:\dotso\dotso (1)}$$ This has to be discretized to obtain a finite difference equation. Let us consider a rectangular grid as shown below. The index 𝑖 runs vertically i.e. row wise whereas the index 𝑗 runs horizontally i.e. column wise. Any inside node ... Read More

Advertisements