Hello! Below is the code for the following task:
matrix "Q" with a dimension of 3*2 was obtained using a matrix of cells "A";
then the matrix "Q" is exported to Microsoft Access with the same dimension (3 rows, 2 columns).
(!) The difficulty is that only the first row of the matrix is written...
A=[ 8147 6324 9575 9572
9058 0975 9649 4854
1270 2785 1576 8003
9134 5469 9706 1419];
D=diag([T^(-3)*L^2 T^(-3)*L^2 T^(-1)*L T^0*L^0]);
I have matrix A whose first two columns are of the units T^3/L^2, third columns unit is T/L, and the last...
I am having a slight issue with my code and honestly cannot understand what I am doing wrong. I am currently trying to using a high pass filter in the frequency domain to form the following image.
So my approach so far after numerous of attempts which I won't list as I believe I am on the...
Hello,
I want to develop a pressure regulator model in simscape. The model will be the springloaded direct acting system and the aim is to target outlet pressure, temperature and flow rate by giving input parameters as pressure, temperature, spring stiffness, length and preload, lever(it is...
Homework Statement
[/B]
The scalar triple product computes the magnitude of the moment of a force vector about a specified line. It is M = ( r×F ) ⋅n , where is the position vector from the line to the point of application of the force and is a unit vector in the direction of the line. Prompt...
Homework Statement
Modify the function so that instead of returning all n numbers, it only returns the nth number.
Homework EquationsThe Attempt at a Solution
I'm not sure how to return only the nth number of the fibonacci sequence. Please help.
I am very new too Matlab and how it all works but I am having trouble understanding at what axis the numerical integration is occurring from on the graph that I plotted.
So I am currently doing an experiment in gamma ray spectroscopy and due to issue with the software we found it hard to...
Hello all
I am using the method of lines to solve the following PDE:
## \frac {\partial C} {\partial t} + F\frac {\partial q} {\partial t} + u \frac {dC} {dz} = D_{ax} \frac{\partial^2 C} {\partial z^2} ##
## \frac {\partial q} {\partial t} = k (q^{*}-q) ##
With these initial conditions:
##...
Homework Statement
The attempt at a solution
Constructing the total impedance of the circuit as follows,
$$\frac{1}{Z_T}=\frac{1}{Z_R}+\frac{1}{Z_C}+\frac{1}{Z_L}$$
where $Z_R=R$, $Z_C=-j\frac{1}{\omega C}$ and $Z_L=j\omega L$.
$$\frac{1}{Z_T}=\frac{1}{R}+j\omega C+\frac{1}{j\omega L}$$...
I know a little bit of MatLab (for example I can solve simple, well conditioned, systems of 1st and 2nd order ODE), but I know nothing about Mathematica. I don't know whether or not start to learn how to code in Mathematica or keep studying MatLab.
For example, for CFD (computational fluid...
I have tried to searched for functions online and apply it, but still it does not work well.
May I ask how can I solve symbolic simultaneous equations with Matlab? Or is there anything went wrong with my program?
Homework Statement
Consider a stepped beam shown in below. The beam is...
I was looking forward to buy Matlab student license sometime this year. Anyone who has already bought a license knows that a number of toolboxes are available. Here is the site.
I am not buying Simulink at this moment. So, please leave out anything related to Simulink.
Other than the basic...
Im trying to calculate the principals moments of inertia (Ixx Iyy Izz) for the inertia tensor by triple integration using cylindrical coordinates in MATLAB.
% Symbolic variables
syms r z theta R h M; % R (Radius) h(height) M(Mass)
% Ixx
unox = int((z^2+(r*sin(theta))^2)*r,z,r,h); % First...
Does anyone know of a great text that shows how to set up FEA in MATLAB in detail. I have wrote out the sort of pre pseudo code from John Andersons - Computational Fluid Dynamics now I just need to build it out in code. I am old school with the hand sketches, hopefully this does not get me a...
Hi, I felt like I have to learn more than one coding language, and wanted to strengthen my coding skills in general. I am good with Relap5 but I want to learn OpenFoam. is what I did logical and going to be worth the pain ? also I only have the Relap5 version of a windows ,is it possible to run...
Hi,
Mostly i work with Octave / Matlab but i am trying to get into python also.
Lately i have a couple problems where my numbers can't be represented in binary64 or float64 default format because they exceed the max of 1.8x10^308. Is there a common way people deal with this (without toolkits)...
Hello,
Does anyone know if a finite element skeleton source code exists. Finite element can be used for structural memebers, gas dynamics, etc. But the over all stepping software is the same and then just input the core equations.
My application is for pseudo one dimensional compressible...
greetings.
I designed a system on simulink.
it is missing a pmsm.
I found a block on simpowersystems in simulink nde matlab.
I hope that this engine provides a nominal power of 96kw and maximum of 100kw.
so how to test it? to verify that this engine can deliver these two powers?
cordially. said.
Hello PF,
I am considering some options in my upcoming PC build and want to choose the one that performed best in MATLAB. What I mostly do is velocimetry with a big amount of points, image processing, statistical analysis. My options are between 2 CPUs:
AMD Ryzen 2700 - for the 8 physical...
Hello,
How can I evaluate the following nested integral in MATLAB for a general value of ##K##
{\int\limits_{u_1=0}^{\gamma}\int\limits_{u_2=0}^{\gamma-U_1}\cdots \int\limits_{u_{K}=0}^{\gamma-\sum_{k=1}^{K-1}U_k}}f_{U_1}(u_1)f_{U_2}(u_2)\cdots f_{U_{K}}(u_{K})\,du_1du_2\cdots du_{K}
where...
Hello everyone.
I was wondering if someone could tell me how to write the next line of Mathematica code in Matlab.
x = Sum [ Sqrt [ vals[ [ j ] ] ] * vecs [ [ j, All ] ] * z [ [ j ] ] , {j,1,10}
vals is a eigenvalues vector, vecs is a eigenvector matrix and z is a vector of random variables...
Homework Statement
I would like to convert this R code into matlab. This code perform a calculation of beta coefficient based on Detrended cross correlation analysis.
Homework Equations
require(tseries)
require(fracdiff)
require(matrixStats)DCCA_beta_avg<-function(y,x,smin,smax,step){...
Here's what I have to do:
1) I arbitrary give a first value to the variable ##x_b##. Let's say ##x^{(0)}_b = 0.3##
2) I find ##x_D## by evaluating this integral:
$$ln(\frac {52.32} {100}) = \int_{0.5}^{x^{(0)}_b} \frac {dx} {x^{(0)}_D - x}$$
3) I use the value I got for ## x^{(0)}_D## to...
Hi,
I am trying to gain insight into using stationary vs. rotating coordinate frames for natural frequency calculations. I have seen many FE codes suggest that critical frequencies can be calculated differently in rotating and inertial frames, so i wanted to do a 1D calc to see for myself how...
I would like to solve this system, which is a sets of non linear quadratic equations, the system needed to be solved can be expressed in general as follow:
ϒϒ'C – ϒα = B
Where ϒ=(ϒ1,ϒ2,...ϒn)’ is a column vector and ϒ’ its transpose
C=(c1,c2,…,cn)’ and B=(b1,b2,…bn)’ are a columns vector
And...
Hi all,
I'm trying to simulate the Fresnel diffraction by using this expersion :
$$ A(x')=\frac{1}{j\lambda z}e^{jk(z+\frac{x'^2}{2z})}F(A^{trans}(x)e^{jk\frac{x^2}{2z}})_{u=\frac{x'}{\lambda z}} $$
So when I use this formula my problem is that I don't know how to take the good frequency, here...
Hi , I am trying to extract the binary bitstream from QPSK using MATLAB. Will something like Frames = reshape(B,[],N)
work? If not, can someone point me in another direction?
Homework Statement
Write code for solving the integral ##\int_{0}^{x}e^{-t^2}dx## using simpsons method and then plot the function from ##x = 0## to ##x = 5## with ##0.1## increment.
Homework Equations
3. The Attempt at a Solution [/B]
I was told that the best way to plot the function is to...
Hello everyone.
I am trying to generate the KL expansion of a stochastic process. I use a Monte Carlo sampling method to generate the process, which involves two random variables and I compare it with it's theoretical mean for 50 values of time and they look quite similar. Then, I calculate the...
i have a assignment for my MATLAB (first year) class, and I am slightly confused om what exactly i should be coding.
im not struggling with the coding part, but what i am suppose to code.
im used to coding based on what it is needed.
So, for my project, I am suppose to represent the forces...
Homework Statement
I have to write a MATLAB script that calculates the horizontal distance of a projectile fired from a cannon set at 45 degrees by a compressed spring. I know that the spring constant is 6 lb/in, the unstretched length of the spring is 1 foot, the mass of the projectile is 0.1...
Hello everyone, I'm trying to make a MATLAB program which read a file.dat and then do a histogram
This what I did
Data2=importdata('Ma.DAT');
R1=Data2.data(:,17)
R1(R1>-9.9)
L = 0:0.1:8;
histc(R1,L)
bar(L,histc(R1,L),'histc')
xlabel('R1')
ylabel('counts')
I want to eliminate all the number...
Hello,
I am writing a program in MATLAB that reads a file.dat, I also want to draw by bin of z and degraded the color for example for z between 0 and 1 put the color red, for z between 1 and 2 put blue. But I do not know how to do it
Here is my code
Data2=importdata('fichier.dat')...
Hi PF!
I'm trying to export two matrices ##A## and ##B## from Mathematica into MATLAB. I can export one just fine; so far what I write is
SetDirectory[NotebookDirectory[]]
Export["data.mat", {A}]
Do you know how I can export two variables at a time and then how I can export directly into...
Hi,
I am trying to code ultrasonic transducer radiation in water using angular spectrum of plane waves. I am having difficulties in the sampling and fft. If anybody has an idea about this can you please help me out? I can paste the code once i get some response.
Thanks for your help!
Homework Statement
Verify Superposition Principle using Matlab, given a DC source of 100V, an AC source of 50V, 60Hz and three resistances, R1=10 ohms, R2=20 ohms and R3=15 ohms.
I created the circuit below and ran the program. Result:
Homework Equations
None, just running the program...
I have a python script for which the input data are coming from Matlab. I have tried to use pymatlab, but it is failing. Can anyone suggest any other method?
Homework Statement
I am trying to create this plot in MatLab
I'm starting out doing the simplest one, no drag, no wind. simple kinematics, right? but I can not get my code to run.
Homework Equations
Kinematic Equations
The Attempt at a Solution
close all
clear all
clc
%%defining variables...
Homework Statement
I need to write a program in Matlab that accomplishes this graph:
I keep getting an error on Line31 Column 161 about unexpected parenthesis. They look balanced to me. If I take one away from either side, I get an error that I am short a parenthesis.
I also need to change...
Hello everyone.
I am trying to create a matrix in Matlab with two columns which should look like as follow:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9...
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1...
Has anyone programed something like this before?
Hi, I made the following command in MATLAB to test for the following:
\begin{equation}
\langle T\psi,\phi\rangle=\langle \psi, T\phi\rangle
\end{equation}
%Self-adjoint test
syms x
a = (diff(exp(-x^2)))*exp(-2*x^2)
b = (diff(exp(-2*x^2)))*exp(-x^2)
W = int(a, x)
P = int(b, x)
O=W-P
and it is...
So here is the program. I've spent a few hour trying to follow it. I numbered each line and after the code will try to explain what I think is going on in each line. I'm completely new to Matlab, and programming is a great weakness to me. I need help.
01. nuclei=zeros(1,100);
02. t=nuclei...
Good afternoon,
I have a problem which I haven't solved yet, regarding a non-linear fit to a set of experimental data. I tried to solve it in Matlab, which I handle a little bit.
I have a sensor, which has been designed to have 4 different filters in front of it. By making a sweep with the...
Hello, below is the screenshot from the book INTRODUCTION TO MODERN DIGITAL HOLOGRAPHY With MATLAB (TING-CHUNG POON, JUNG-PING LIU). This book is free to download. There is a script for Fraunhofer diffraction pattern and equation 1.40 is Fraunhofer diffraction formula in terms of Fourier...
Consider, I have a dynamic system model for air compressor. Which means I have modeled the system by including its physics. Does this means I also included the transients of the system?
What I think is, when i modeled any system with equations, I think that includes the transients. Is it...
Homework Statement
Homework EquationsThe Attempt at a Solution
I'm taking Computational Physics. And I am trying to learn how to program in matlab. But I don't understand the author's code and what it is in MATLAB code. Can someone help me?
I was reading this article (https://www.nature.com/articles/srep40083) about designing a panoramic lens with transformation optics, and wanted to try to play around with modifying the coordinate transformations. I contacted one of the authors of the article, and she mentioned that she plotted...