Read about matlab | 291 Discussions | Page 1

  1. S

    MATLAB How can I plot a Hohmann Transfer Orbit in MATLAB using ode45?

    function Asteroid_Mining clc %Initial conditions g0 = 9.81; %gravity (m/s^2) p = 1.225; %atmospheric density at sea level (kg/m3) Re = 6378; %radius of Earth (km) Ra = 7.431e7; %distance of Bennu from Earth in (km) [August 2023] G = 6.674e-11/1e9; % Gravitational constant (km3/kg.s2) mu =...
  2. S

    MATLAB Calculating the time taken for an asteroid mission using MATLAB

    Using MATLAB, I am trying to calculate the time taken for a spacecraft to travel from Earth to a near earth asteroid and then returning back to Earth but so far I have had no luck. Furthermore, I want to plot a Hohmann transfer and calculate the mass of fuel required for this mission. If...
  3. Will26040

    MATLAB MATLAB Plug flow reactor optimisation Problem

    The assignment is to find the optimal operating temperature and maximum product concentration of reactant B, assuming a constant temperature across the PFR length. Please could someone help? thanks the reaction is a series reaction: A → B → C (liquid phase) Here is my current code which is...
  4. tworitdash

    MATLAB How to change the frequency values inside a time domain signal phase

    The problem I am having is simple. I have a Gaussian spectrum initially. Like this, Process 1: S = m0/sqrt(2*pi*sigma^2) * exp(-(vel_axis - mu).^2/(2*sigma^2)); Here, mu is the mean velocity (frequency) and sigma is the standard deviation. vel_axis is the axis on which I am calculating this...
  5. D

    Tetrahedron Simplex Shape Functions in FEA

    Hi, 2 part question trying to get tetrahedron Finite Element shape functions working: 1) How do I properly setup the shape coefficient matrix and 2) How do I build the coefficient quantities in the shape functions properly? ANY tips or corrections may unblock me and would be of much value...
  6. patric44

    Non linear BVP using a shooting algoritm with MATLAB?

    hi guys i was trying to use this shooting algorithm from Xue and Chen Scientific Computing with MATLAB book : to solve this non linear temperature distribution problem : i checked my Matlab function multiple times but i am keep getting a nonsense graph for the temperature , can someone cheak...
  7. T

    Comp Sci Matlab report help please (Finite Difference Method)

    We have to submit a Matlab (my worst module) assignment to show the heat transfer on a plate. However, I have the 2 codes almost done but I am struggling to write the report. To calculate the temperature on a 2D aluminum plate we need to use the Explicit Finite Difference Method. The problem...
  8. patric44

    Temperature distribution of a current carrying wire using the Shooting method in Matlab

    hi guys i was trying to solve this non linear ode using the shooting algorithm in Matlab : i am not sure how to solve it using the normal shooting algorithm i have , since no other boundary at x = L/2 was given to check the shooting ?! function dTdx = bar_temp(x,y) k = 72; h = 2000; epsilon =...
  9. angel1601

    Need help with this lift-line theory application

  10. WhiteWolf98

    MATLAB How to make a while loop stop when reaching a certain value [Solved]

    m_1 = 1; C_p1 = 2219; T_1in = 100 + 273.15; T_1out = 75 + 273.15; Q_1 = (m_1)*C_p1*(T_1in-T_1out); while Q_1 ~= 30000 T_1outnew = T_1out + 0.1; Q_1 = (m_1)*C_p1*(T_1in-T_1outnew); T_1out = T_1outnew; end T_1outnew keeps increasing, but the code never stops; and naturally, Q...
  11. J

    A Nonlinear Wave Equation (Nonlinear Helmholtz)

    I am trying to solve a PDE (which I believe can be approximated as an ODE). I have tried to solve it using 4th Order Runge-Kutta in MATLAB, but have struggled with convergence, even at an extremely high number of steps (N=100,000,000). The PDE is: \frac{\partial^2 E(z)}{\partial z^2} +...
  12. person123

    Widgets for Visualizing Engineering

    Hi! First off, I'm just an upcoming junior in Civil Engineering, and I have little teaching experience. I have done well in engineering classes so far though, and I've thought about ways to improve how classes are taught. While there are some widgets for engineering, like those in MATHTAB and...
  13. C

    MATLAB Deconvolving two signals with different sampling rates

    Hi, So i am in a fix now. I have a discrete time signal which is produced by a device with Nyquist frequency as 50MHz and 1088 samples (there is nothing i can do with the device to change the frequency or number of samples). I have an analytical signal which is produced in the frequency domain...
  14. J

    A Writing a matlab program to solve the Kepler Problem (Universal Vars)

    Introduction: I am writing a Matlab program that solves the Kepler problem for any Elliptical, Hyperbolic, or Circular orbit. Given an initial position vector, velocity vector, find the position vector and velocity vector after some given time. I am not doing this for any class, I have been...
  15. Boltzman Oscillation

    How can I create an equation in matlab for image processing?

    Here is the documentation for the 2DFFT: how would I go about creating this formula on matlab to apply it on an image? My guess is that I need to create the equation and then multiply it to the image I need such as: $$U = VI$$ where V is my...
  16. A

    The modeling and design of a photoreactor for phenol degradation in wastewater treatment using MATLAB

    I researched the solar collectors implemented in practice for water detoxification and I found out that the preferred design is the Compound Parabolic Concentrator. Knowing that I have no information regarding radiation beyond what's taught generally in heat transfer courses in chemical...
  17. E

    Modeling/Analysis of optical fibers

    Hello PF, I need some guide points to help me formulate a project idea on the topic of optical fibers. Namely, the professor suggested I should look for topics on modeling of optical fibers, analysis of different optical fibers, characteristics etc. and to work in a simulator, or perform a...
  18. currently

    Position-Velocity phase plane portrait in MATLAB?

    For example, how would I graph a Position-Velocity phase portrait of a nodal sink or spiral sink? Given form of mx'' = -cx' - kx + βx^3.
  19. V

    Mathematical Modeling of an evaporator for evaporating water

    I am trying to model an evaporator which evaporates water to steam in Matlab/simulink. Are there any governing equations i need to know and follow when modelling the evaporator mathematically? Please let me know.
  20. M

    Engineering Reconstruct a signal by determining the N Fourier Coefficients

    %My code: %Type of signal: square T = 40; %Period of the signal [s] F=1/T; % fr D = 23; % length of signal(duration) dt=(D/T)*100; N = 50; %Number of coefficients w0 = 2*pi/T; %signal pulse t1= 0:0.002:T; % original signal sampling x1 = square((2*pi*F)*(t1),dt);%initial square signal...
  21. A

    MATLAB Bilinear spline interpolation MATLAB using MESHGRID and SURF

    Hello. So, I must provide a solution for an image processing course I am taking (implemented in MATLAB). The task is as follows: 1. I must provide a MATLAB script that takes in a DISCRETE N x N matrix (Greyscale picture) and does Bilinear spline interpolation on it. This is the spline...
  22. whoohm

    Anyone using Maple in 2019 on regular basis?

    I know these software packages were discussed a lot in the past, but I have not seen much input from the last couple years. I have used Matlab for many years, but remember using Maple in University Physics courses many years ago. I'm interested in a software package for symbolic math to use...
  23. Leanne

    Finding the diameter of a wire

    Mentor node: Added code tags From=menu('select:','c', 'g', 'a', 's:'); This is part of my code and I'm not coming up with anything close l=input('input wire length') %current copper=12.5572...
  24. P

    What specs should I look for in a laptop

    After completing my sophomore year at college as a Physics major and I realized that the laptop I currently have is not able to keep up with the demand I put it under for school. The laptop I currently have has a <2 hour battery life and has been known to crap out (didn't know how else to...
  25. JJ_Badoo

    I Calculate the exit force of a bullet leaving the barrel

    So, Basic premise is I have 1 input and one output, Energy friom the gunpower burning is input, and the output is the force which pushes the bullet after it is reduced by the friction. m = 12.96 g s = 0.6985 m (barrel lenght) E = 6734 J k = 0.5 (friction coeffcient) I am sorry for lack of...
  26. K

    MATLAB Spring mass impact system in Matlab - How to correct it?

    I am new to Simulink and I wanted to start practicing using a spring mass damper system. My first tutorial was this: Later, I wanted to model a spring system where a mass moving at a known velocity hits the spring. The governing equation and a similar modeling method given in the previous...
  27. M

    Non trivial solution to Schrödinger equation for 1-D infinite well

    Hello, I am trying to find the solution of Schrödinger equation on matlab. However, when I apply boundary conditions, MATLAB only gives me the solution with both coefficients 0. I want to find the solution : Asin(n*pi*x/L) You can see my code below. Could you please tell me where is my mistake...
  28. R

    I Simulating irrational numbers

    I am trying to write an algorithm that generates two random numbers in a given interval such that their ratio is an irrational number. I understand that all numbers stored on a computer are rational, so it is not possible to have a truly irrational number in a simulation. So, instead I am...
  29. R

    I Re-scaling of exponentially distributed numbers

    For simplicity, let ##N=1##. The following histograms show my results. The generated random numbers are initially exponentially distributed. But after re-scaling they become almost uniformly distributed. What is the cause of that, and is there a solution? P.S. Here is my code in Matlab...
  30. D

    Need help with Matlab Function of Differential Equations

    WHAT HAPPENS IS That I need to model the example of A Protein G example, using a function f in Matlab, but when I execute the script, the graphics I get do not correspond to those of the example. The problem is that I can not understand what the model seeks to represent, besides that I do not...