Matlab Definition and 1000 Threads

  1. M

    MATLAB Solving Linear System with Eigenvalues in Matlab

    Hi PF! I am looping through a linear system and each time I do I generate a new matrix, call this matrix ##A##. When finding the eigenvalues of ##A## in Matlab is use [a,sigma2M] = eig(A);% a eigenvector and sigma2M matrix of eigenvalues sigma2(:,ii) = sum(sigma2M);% create matrix with rows of...
  2. C

    MATLAB Graphing Matlab Heat Transfer | T_0 Variable

    I'm working with heat transfer and need to graph theoretical results. I've tried several things and it will either throw something along the lines of "no explicit solution found" or just hang forever. I'm not new to programming, but I am new to the Matlab library. The only variable is T(t). T_0...
  3. M

    MATLAB How Can You Explore Autocorrelation Functions for Different Lags in Matlab?

    Hello everyone. Iam a little bit confused about the autocorrelation and using Matlab so I hope someone can help me out. As far as understand Matlab computes the sampled autocorrelation where the lag between the samples is given by x(n)* x(n-l). Buy what if the autocorrelation depends on the...
  4. Wrichik Basu

    MATLAB Top Books for Learning Matlab: Beginner to Advanced Level with Java Knowledge

    I've recently started to learn MATLAB (self-study). I first tried to learn by an app on Google Play, and work out the examples on the Matlab app. But the app is very bad, and I can't understand anything after a while. What books can I use for learning Matlab? I have a good knowledge on Java...
  5. N

    MATLAB In MatLab How can we stop/start process during processing?

    I have tried to write MATLAB code for creating animation by using linear transformation, so I want to stop process during processing and then start process during processing. such I have stopped process for 5 seconds after that I start process.I don't know a command that should be used in my...
  6. I

    MATLAB Small matlab code not working. Why ?

    Code is the following : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% xiter=[0.7 20 10]; mubeton=[0.100 0.80 0.70 0.60 0.50 0.25]; muair=[0.05 0.042 0.04 0.032 0.021 0.011]; zl=[5 30 70 100]; fnorm1 = @(d,a0,dmax) (a0*(1-exp(-(0.5*log(d./dmax)).^2))+exp(-(0.5*log(d./dmax)).^2)); fnorm2 = @(d,dmax,DRL)...
  7. S

    MATLAB Separation of variables in MATLAB

    Hello, I haven't found any program that can be used to perform separation of variables on difficult PDEs. Is there such a method somewhere?
  8. M

    MATLAB Efficient Method for Constructing Matrix of Products in MATLAB?

    Suppose we have two vectors ##a = [1,2,3]## and ##b = [4,5]##. I want to construct the matrix of products, i.e. $$ \begin{bmatrix} 1\cdot 4 && 1\cdot 5\\ 2\cdot 4 && 2\cdot 5\\ 3\cdot 4 && 3\cdot 5 \end{bmatrix} = \begin{bmatrix} 4 && 5\\ 8 && 10\\ 12 && 15 \end{bmatrix} $$ Does anyone know an...
  9. kostoglotov

    Nyquist and FM and Signal Mixing....

    In an assignment I have, we are told to implement a Frequency Modulating function without using any of MATLAB's in-built functions, and not to use it's integration function either (use cumsum instead). I've been getting a lot of problems trying to solve these assignment problems without telling...
  10. kelvin490

    MATLAB Solving equation with integration using MATLAB

    I would like to solve an equation below using MATLAB: All the parameters except p are known, so I only need to solve for p. However since I need to consider the sign of the integrand and there is an absolute value sign in it I don't know how to solve it. Could anyone please help? Thank you.
  11. S

    MATLAB Weighting data points with fitted curve in Matlab

    Hi all, I'm currently in the middle of performing an experiment for the final project of my MSc, and I have a question about how I should go about weighting the data when fitting a curve to it using the MATLAB fitting tool. Firstly, a bit of background about the problem. I am seeing how low...
  12. Abdul Wali

    MATLAB Matlab Derivative block analysis and filter design

    Hi, May someone helps me regarding this!? i have a controller which will control AC motor as attached. in this controller, a stage comes where I need to use a Derivative Block before point 'B' as shown in the attached picture " controller block diagram" [...
  13. A

    Programmes to learn for Nuclear Engineering Masters

    I am about to begin an MSc in Nuclear Engineering. I am competent in MatLab language but wish to practice/learn another in the time before my course starts. Would I be well served in continuing to practice MatLab or to learn another from scratch (C/Java/Labview)? Are there any particular areas...
  14. M

    MATLAB Solving MATLAB to Excel Copy Issues

    Hi PF! I am trying to copy info from MATLAB to Excel via the following code filename = 'testdata.xlsx'; A = [12.7 5.02 -98 63.9 0 -.2 56]; xlswrite(filename,A) but I receive the following warning: Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV...
  15. P

    MATLAB Simulink: designing a 2nd order sliding controller

    Hi, I've had obtained a mathematical model for the slip controller issue. As you see I have the diffequation for the slip. and the input that force the system to zero error is provided as well. Now it's time to implement it in simulink or matlab. I took a look at the example provided on...
  16. Monsterboy

    Elliptical paraboloid surface in matlab using F/D = 0.3

    Homework Statement To generate a elliptical paraboloid antenna surface in MATLAB using the given F/D ratio (= 0.3) F- focal length D- Diameter = 50 m Homework Equations ## \frac {F}{D} =\frac {1}{4tan(\theta/2)} ## ## F = \frac {D^2}{16H} ## H = height of the paraboloid Equation of a...
  17. kelvin490

    MATLAB Matlab -- how to make a smooth contour plot?

    I want to represent data with 2 variables in 2D format. The value is represented by color and the 2 variables as the 2 axis. I am using the contourf function to plot my data: load('data.mat') cMap=jet(256); F2=figure(1); [c,h]=contourf(xrow,ycol,BDmatrix); set(h, 'edgecolor','none'); Both xrow...
  18. Joacim Jacobsen

    I Intersection between line and cylinder

    I have an expression for a "line- to sphere intersection" that works: a = 1 + Ax^2 + Ay^2 b = 2*(-zs + Ax*(Bx-xs) + Ay*(By-ys)) c = zs^2 + (Bx-xs)^2 + (By - ys)^2 - R^2 This is part of a code in Matlab, and works fine. It is derived from substituting (x=Ax*z+Bx, y=Ay*z+By) into...
  19. M

    MATLAB MATLAB and averaging without NaN

    Hi PF! Let's say we have a vector ##x = [1, \,2,\, 3, \,20,\, 4,\, 5,\, 30,\, 6]##. I am trying to loop through and find the magnitude of the derivative of each ##i^{th}## element with unitary spacing, and if that derivative is sufficiently high, I make that element NaN and continue. Example...
  20. J

    MATLAB Books to read for Matlab, C++, and Circuits?

    Hi I am an undergraduate EE student into my 3-4th year. I feel like my fundamentals are not so good at times and I want to improve. I want some recommendations on what books to read to really help improve my fundamentals. I really don't like the textbooks we are reading. They are just too broad...
  21. J

    MATLAB Highlight an object in an image?

    Hi Everybody I'm a new user and hope I have posted in the correct section. I'm a beginner in MATLAB and image processing. Using matlab, I have to highlight in an object in an image. I have an input image where there is a plate with a food. I need to produce an output image where only food is...
  22. Addez123

    How does image matrix filters work in matlab?

    I got an image called img and I want to sharpen the vertical spatial lines. I created this matrix: hp = [-3 -2 -1 12 -1 -2 -3]; hp= rot90(h_lowp); Then I do this to get the new image: newimg = uint8(conv2(single(hp), single(img))); It SORTA works, but I'm not so sure why it works. I mean all...
  23. N

    MATLAB Why 2 vectors are not the same in matlab?

    I have 2 vectors: a = 1.0e-04*[0.110000000000000 0.140000000000000 0.140000000000000 0.140000000000000]; b = [0.000011000000000 0.000014000000000 0.000014000000000 0.000014000000000]; by look at by eyes, it seems similar; but when I use this command: a == b then I got...
  24. F

    MATLAB Question about representation of data in Matlab

    Hi everybody; I have plotted a matrix with sea surface temperature's correlation with another variable, the size is (360x180x12); using to plot : figure for i=1:12 subplot(4,3,i);imagescnan(loni,lati,squeeze(double(r4_sat(:,:,i)))'),colorbar; end Now, I want to plot over it another matrix of...
  25. jamalkoiyess

    MATLAB How to create distinct circles in Matlab?

    I want to create a plate of distinct circles on Matlab where their radii are generated by randn(1,p) and centers are random. I am currently doing the circles using viscircles, but some of them are overlapping, and since I want approximately 100 ones, this problem only gets worse. How can I make...
  26. N

    What is preventing me from achieving better accuracy for this delay?

    I have 2 PERFECT data of the transmitter and receiver. From 2 data, I can calculate the delay estimation: Fs = 8e6; % sample rate ... for i = 1:2 [cc_correlation,lag] = xcorr(signal2(i), signal1); [cc_maximum, cc_time] = max(abs(cc_correlation)); cc_estimation...
  27. N

    How to calculate standard deviation?

    I have 2 signals: signal1: https://www.dropbox.com/s/zr04pff9skeh8cn/TX.dat?dl=0 signal2: https://www.dropbox.com/s/h436a915dd99hln/RX1.dat?dl=0 signal2 represents for 20 measurements, each measurement combines with signal1 to get time delay estimation using xcorr. So, I will have 20 delays...
  28. N

    MATLAB I with matlab designing a steady state feedback H2 control system

    Hi everyone. I'm designing a steady state feedback H2 control system. Actually, my major is tribology and I have no experience in designing control system. So it is really big problem for me. Anyway, this is my simple model of tribometer which applies normal load on the surface. (is it...
  29. B

    MATLAB How can I implement the 2D GrayScott model in MATLAB for a screensaver?

    Dear Community, I was trying to reproduce the 2D GrayScott model given either here: http://blogs.mathworks.com/graphics/2015/03/16/how-the-tiger-got-its-stripes/ or here: http://www.joakimlinde.se/java/ReactionDiffusion/index.php?size=0 The reason was to create a nice screen-saver (so I am...
  30. Arman777

    MATLAB Matlab Power Fit on Graph-Codes

    I have some data and I need power fit.And display it on the graph.But I couldn't find the right codes for it.(I need codes) Here my graph, Here my codes, >> x=BN(:,2); >> B=BN(:,1); >> plot(x,B,'go') >> plot(x,B,'go') >> hold on >> xlabel('Distance (m)','Fontsize',21); >> ylabel('Magnetic...
  31. hilbert2

    Comparison of high-level computer programming languages

    A little question about the appropriateness of a certain research subject... Would it be useful to make a study of the computational effectiveness of equivalent codes written with Matlab, Mathematica, R Code, Julia, Python, etc. in a set of typical computational engineering problems like...
  32. R

    MATLAB Frequency domain filtering in Matlab

    I am trying to implement several filters in Matlab for Fourier domain filtering. They are the cosine, Shepp-Logan, and Hann/Hamming window filters. These filters are defined as multiplying the ramp filter by the cosine function, sinc function, and Hann/Hamming windows respectively. This is how...
  33. Arman777

    MATLAB Matlab Displaying the Fit Equation On graph.

    I have a lineer data and I want to write the equation of it on the graph. The x-axis is inverse distance (1/m) and I showed as "d" The y-axis is capacitance (C) and I showed it like "C" My data name is d_C Here my codes that I used for now >> d=d_C(:,1); >> C=d_C(:,2); >> plot(d,C,'go'); >>...
  34. M

    MATLAB Eliminate Noise from an Image in MATLAB

    Hi PF! Attached is a binary image I have in MATLAB, where I have drawn an error pointing to some noise. Does anyone know of a systematic way to eliminate all noise below this line (or basically what appears to be the line)? I also uploaded the same image only processed, titled Noise1. This...
  35. N

    How to calculate Time Delay Estimation?

    I have 2 data files, which links are attached below: Transmitted data https://www.dropbox.com/s/0nmhw6mpgh7upmv/TX.dat?dl=0 Received data https://www.dropbox.com/s/xgyo6le3bcmd25r/RX.dat?dl=0 Those binary data are read by this MATLAB code: %% initial values: nsamps = inf; nstart = 0; %% input...
  36. ThunderLight

    MATLAB How to spin the colormap in 2 different circles in matlab

    Hi, I'm trying to rotate 2 different plotted circles in matlab, which have the Jet colourmap. Colormap has the Spinmap function, but when I use it, it only spins the Jet colormap in 1 circle, leaving out the other. I would like to spin the Jet colormap in2 different circles in opposite...
  37. Arman777

    MATLAB Plotting Data with Matlab - Learn How to Code & Graph

    I have some datas from our physics experimetn and we have to plot them on matlab.Idk how to do them,I don't know how to write codes.Also I have to write of the axises and table names
  38. S

    MATLAB Working out an equation on MATLAB using co-ordinates

    I have a series of data points for X and Y points on a graph. The data is quite random and I am trying to work out a trend line so I can then form an equation for the line. How would I go about working out the equation for the data below using MATLAB? (0, 580) (6.7, 495) (13.4, 445) (18.7, 365)...
  39. M

    MATLAB Working with Edge function in MATLAB

    Hi PF! Attached is an image I generated using the edge function in MATLAB (except the arrows, obviously). I would like to extract just the coordinates of the pixels from the bottom curve, which I've pointed at with arrows, and only in the domain between the red lines. Does anyone know how to...
  40. S

    I Working out the equation for coordinates on a graph

    I have a series of data points for X and Y points on a graph. The data is quite random and I am trying to work out a trend line so I can then form an equation for the line. How would I go about working out the equation for the data below. (0, 580) (6.7, 495) (13.4, 445) (18.7, 365) (22.8, 350)...
  41. JayFlynn

    MATLAB Plotting the tragectory of an asteroid in MATLAB

    I am trying to plot the trajectory of an asteroid in MATLAB using ode23. The only bodies in the system are The Sun, Earth, Mars and Jupiter and their orbital data has been loaded from data files. I have picked arbitrary initial conditions for the asteroid and believe my forces are correct. My...
  42. A

    MATLAB Python and MATLAB giving different results for same code?

    I am trying to learn Python by translating my MATLAB codes into Python. My translated Python code is giving slightly different result as compared to that of MATLAB. Although difference is very small but it affects largely the results at later stage. My Python code is import numpy as np import...
  43. Sirsh

    4DOF Spur Gear System - Eigenvalues not corresponding with the Eqns?

    Hi there, I am modelling a four degree of freedom system which is the dynamics of two spur gears in mesh, having two rotational and two translation degrees of freedom, respectively, a diagram exhibiting the system can be seen below. I have derived the equations of motion (EOM) and...
  44. Pouyan

    Matlab Homework: Plotting T vs λ with Max Function and Stylish Design

    Homework Statement I have a function : and I want to draw : Homework Equations where T has values : 600, 800, 1000, 1100 And λ:(0,10*^-5] I have to use max function with two values and the solution must not consist of repeating four times of similar snippets of code, one for each curve.The...
  45. C

    Control Systems - How to find dominant poles *without* MATLAB?

    Homework Statement Design a lag-lead compensator for the system of Figure 9.37 so that the system will operate with 20% overshoot and a twofold reduction in settling time. Further, the compensated system will exhibit a tenfold improvement in steady-state error for a ramp input. Homework...
  46. M

    Linear Algebra: Matlab Question

    I am taking a linear algebra class, and it has a required lab associated with it. Here is the following problem that I must solve using Matlab 1. Homework Statement Write a function using row reduction to find the inverse for any given 2x2 matrix. Name your function your initial + inv(M), the...
  47. F

    MATLAB Matlab map representation problems

    Hi everybody. I am currently doing a metheorological study of Angola's climate. I can draw the country's shape without much trouble. >> worldmap angola >> load coastlines >> plotm(coastlat,coastlon) But once I have the shape drawn things start to go downhill. I have a vector with the...
  48. Eswin Paul T

    MATLAB How to load .mcs files into matlab?

    I am working on Lidar systems and measure the back scattered photons using a Multi Channel Scaler(MCS) The data files are of .mcs format. I need to load these .mcs files into MATLAB. How do I do this in matlab? Is there any function to load these file extensions into matlab? Thanks in advance...
  49. Drakkith

    MATLAB Line Styles in a Graph in MATLAB

    I'm trying to plot 5 periodic functions on the same graph in MATLAB and I can't seem to figure out how to do it correctly. The following code will work, except that I still need to change the line style for each line so that they are easy to tell apart. k = 1; %spring constant w0 =...
  50. S

    MATLAB Is MATLAB better for numerical simulation

    From cosmology, the tensor to scalar ratio is ##r=16\epsilon## where ##\epsilon=-\frac{\dot H}{H^2}## is the Hubble slow roll parameter. From warm inflation, $$\ddot \phi + (3H+\Gamma)\dot \phi + V_\phi = 0 ,\quad H^2 = \frac{1}{3M_p^2} (\frac{1}{2} \dot \phi^2 + V)$$ where ##H## is the Hubble...
Back
Top