Matlab Definition and 1000 Threads

  1. R

    MATLAB MATLAB License Error | Troubleshoot & Resolve Now

    I am getting a license error and not able to open MATLAB after trying the troubleshoot.
  2. E

    Fourier Transform and Convolution

    Considering two functions of ##t##, ##f\left(t\right) = e^{3t}## and ##g\left(t\right) = e^{7t}##, which are to be convolved analytically will result to ##f\left(t\right) \ast g\left(t\right) = \frac{1}{4}\left(e^{7t} - e^{3t}\right)##. According to a Convolution Theorem, the convolution of two...
  3. M

    Creating a Monthly Calendar with fprintf in Matlab

    Homework Statement How can I make a calendar with fprintf? It is making me crazy. The parameters year and month are supposed to give me the whole calendar, with month day and dates.[/B]Homework EquationsThe Attempt at a Solution I just get the first line of the month[/B]
  4. J

    Matlab, plotting a directional field

    Homework Statement Plot the direction field of y' = −t(y 2 − .5y − .5) for t=[0,5] and y=[-2,2]. Plot a line every 0.25 units in t and y. The length of each line should be 0.1. Hint: Use line(). Look at the picture to determine the starting and ending coordinates of each line. Homework...
  5. SteliosVas

    Second Order Non linear ode matlab

    Homework Statement Okay the problem is of a free swinging pendulum with dampening which is modeled using the following equation: Damping coefficient: c=1 s−1 Mass: m=1 kg Gravity: g=9.81 ms−1 Link length: l=0.5 m We know θ(0)=90° and θ′(0)=0, solve this equation from t = 0 to t = 10...
  6. L

    MATLAB Convolution: Finding the Convolution of Two Functions with Step Inputs

    Homework Statement Use MATLAB to find the convolution between a) ##f(t) = u(t) -u(t -3)## and ##g(t) = u(t) -u(t -1)## Homework Equations The Attempt at a Solution t = -10: 0.1: 10; f = heavisde(t) -heaviside(t -3); g = heaviside(t) -heaviside(t -1); t = -20: 0.1: 20; c = conv(f, g); plot(t...
  7. I

    MATLAB MATLAB: Merging Matrices - Create 0s Matrix & Replace with Values

    Create a matrix with 4 rows and 8 columns with every element equal to 0. Create a second, smaller matrix with 2 rows and 4 columns where each row is [1 2 3 4]. Replace the 0s in the upper left-hand corner of the bigger matrix with the values from the smaller matrix. (If you do this correctly...
  8. I

    MATLAB How to Calculate Squares and Cubes in MATLAB?

    We want to know the square and the cube of each of the following numbers: 1, 2 and 3. You can have MATLAB obtain these results as follows. Create a vector [1 2 3] . Create a vector [2 3]. Use these two vectors as inputs to the meshgrid function (with the 3-element vector as the first argument)...
  9. I

    MATLAB Simple vector functions in matlab

    I have an assignment for MATLAB where I am required to create two vectors x and y and then to find the sum in three ways. first, create an extra variable z and find the sum second, use the dot function third, multiply x with the transpose of y here's my code x=linspace(0,1,5)...
  10. ElijahRockers

    MATLAB DSP: Best curve fitting approach via MATLAB?

    I am doing an experiment that generates data in three 1-hour-blocks. Each block has a different number and timing for acquisitions. (The first hour is more frequent and numerous, while the last hour is only 6 acquisitions) The reason for breaking it up into 3 hours is to give the subjects a...
  11. B

    MATLAB How to give a step input in Matlab?

    Hello, I have a state space equation at hand.. This attached with this... Now the term (theta double dot) is a positive step for 0,136 milli seconds and negative step for next 0,136 millisecond and 0 at all other times. So that when I simulate I will get a graph as below: This is the nature...
  12. FrancescoMi

    MATLAB Solving One Equation on Matlab: Finding Parameter p

    Hi, I have to solve one equation on Matlab. The equation is: (p-c)*psi'-psi=0 I have to find p. Where psi is: and psi' is the derivative of psi. I've written this code: rho = 0.04; %In the image is lambda c = 25; eta = 0.02; mu = 40; sigma = 0.57; alpha = -rho/eta; syms p t F =...
  13. gfd43tg

    MATLAB MATLAB & LaTeX Syntax Solutions

    Hello, I am trying to publish a file on matlab, and for some reason it won't accept my code, even though it works on this forum. Does MATLAB use some other syntax for matrices? $$ \vec {x} = \begin {bmatrix} T-T_{s} \\ C_{A} - C_{As} \\ C_{P} - C_{Ps} \end {bmatrix}$$
  14. SteliosVas

    Solving Rand Function MATLAB Homework

    Homework Statement The number of iterations it takes for the product of two random numbers to produce a number less than 1e-5. Homework EquationsThe Attempt at a Solutionwhile z < 1e-05 count1 = count + 1; x = rand(1,1); %rand 1x1 matrix z = floor(a + (b-a+1) * rand(b,1)); if z <...
  15. M

    MATLAB How can I add vector input to this MatLab function?

    Hi pf I have a question that I have not been able to find. The below function accepts outside scalar inputs but not vectors. The code is below. Also, ## a, b, delta,FA,Hi,vHnew,iv## are all scalars defined outside the function. The vector I would like to add as an input is ##x##, which I've...
  16. FrancescoMi

    MATLAB Error in MATLAB Code: Fixing 'Function 'diff' is Not Supported

    Hi, I have a problem with my MATLAB code. The error is: "Function 'diff' is not supported for class 'function_handle'." I have installed the toolbox Symbolic Math Toolbox after the installation of Matlab, but I think that it works, so my code is this: t=2; alpha=2; p_0=20; c=10; eta=0.2...
  17. SteliosVas

    Signum Function Matlab Homework Solution

    Homework Statement Okay basically we have two vectors x and y, and we are required to use the signum function to get the negative and positive ones and preform a operation on them. That is square the positive ones and square root of the absolute value of the negative ones. x= [ 1:1:10] y= [...
  18. B

    MATLAB Create Math Graph using Matlab?

    How do I create a graph of y = x^2 + x + 1 in Matlab? Where I could create the above math graph in Matlab (please see below image)?
  19. Remixex

    Am i being taught programming right?

    I'm an 2nd year student aiming for the major "Geophysics", my course, "Numerical Programming for Geophysicists" is teaching me how to use Octave, not Matlab, and they force me to use the terminal, not the GUI, on top of that we use Linux, i am also learning Shell and Python. Regarding the...
  20. Z

    MATLAB Best Free Android Matlab/Octave Code Editor for Quick Calculations and Plots

    I'm wondering if anyone has found a (preferably free/open source) text editor for Android that highlights matlab/octave code syntax? I recently got a tablet and thought it would be pretty nice to be able to use it to quickly put together some calculations/plots during discussions and so. I've...
  21. Lagraaaange

    MATLAB C++ vs Python vs Mathematica vs Matlab? Whats the difference

    What are the differences and pros/cons of each?
  22. B

    MATLAB Want gray scale image of a matrix in matlab

    I am creating a gray-scale image of a 2000*2000 matrix using mat2gray and imshow command.But highest number of matrix entries that imshow can implement is 500*500 approximately.After that it shows------ "Warning: Image is too big to fit on screen; displaying at 8% > In...
  23. B

    Aerospace Eng. Student Struggling with Blended Wing Body Design

    Hello everyone! I'm a aerospace engineering student. I'm working in my own program for blended wing body aircraft parameterized design. I'm triyed to use Tornado program but it doesn't even allow me to setup the geometry, after introducing the chord the program goes in a bucle and when I stop...
  24. A

    MATLAB How to calculate stress on a beam using MATLAB?

    Hey all, I want to calculate the stress and strain on a beam using MATLAB and I would also like to make a stress-strain curve as well. The problem is as follows: I have a hollow rectangular aluminum beam that is fixed at both ends. I have the material properties and the dimensions of the beam...
  25. Z

    MATLAB FFT for one 1*N Green function in MATLAB

    I have a 1×N Green function in energy domain. I want to use the FFT (fast Fourier transform) for this Green function in MATLAB. But this function is non-periodic. Could you help me about this? How can I change the energy interval to convert Green function as a periodic function?
  26. Tone L

    MATLAB Learning MATLAB - A Guide to Tutorials and Books

    Hi, I saw some threads about MATLAB books already but the seemed a little outdated ~2008. I was curious to know if there was any good books to read as a tutorial of matlab. Potentially a pdf online would be cool as well. One thing too is I won't be taking the course at school until September...
  27. J

    MATLAB Plotting an integral-defined function in MATLAB

    At this exact moment, the proper name of functions defined by: f(x) = ∫0xf(t)dt escapes me, so I apologize for the title maybe not being as clear as possible. What I'd like to know is how to go about defining such a function so that I can plot it. Do I just put the variable x into the upper...
  28. Gradon

    MATLAB Therapy imaging processing in matlab

    do you have imaging processing' document in matlab? can you share with me? Do you have code MATLAB about increase form yellow to red? Thanks your attention
  29. B

    MATLAB Matlab Simulink: How to Access SIMSCAPE for Electrical Simulations

    hello people, I have MATLAB R2014a installed in my system, i would like to do some electrical simulations. Unfortunately I am unable to find SIMSCAPE in my library. Can anyone suggest me how to get it. thanks in advance.
  30. goonking

    Matlab question, just checking If i inputted correctly.

    Homework Statement Homework EquationsThe Attempt at a Solution look at line4, did I enter it correctly? I must have did something wrong because there is no contour at all, all i see are parallel lines.
  31. E

    Phase shift in frequency domain

    Hello, I'using Matlab to simulate phase shift in frequency domain (FD). I have got real and imaginary parts of the signal after FFT. I'd like to use phase shift in FD. This works: Y=fft(y); YY=Y.exp(-i*2*pi*nk/N*samples_delay); result=ifft(YY); But in my DSP I can't use the formula above and...
  32. M

    MATLAB Troubleshooting PDEs in MATLAB: Why is My Function Not Affecting the Plot?

    Hi PF! I am trying to solve a pde in MATLAB and started by using the generic code mathwork supplies and then augmenting for my purpose. After defining the function below and run the script, i can do anything to the ##f## and nothing changes. I can literally delete the line and still I receive...
  33. G

    MATLAB How Do I Use fprintf in MATLAB to Write Results to a File?

    Hi guys I'm doing some homeworks for my professor, the homeworks are some MATLAB scripts that consist in creating and running some functions. The professor is requesting that the results obtained must be written in a file using the command fprintf. I have tried to understand the mechanics of the...
  34. G

    MATLAB Exporting data points to Excel with Matlab?

    I have an optimization algorithm running 50 full trials with up to 10,000 iterations each (it breaks off if the error goal is reached before that). I want to export the iteration number and the best function value at each iteration to an excel file, then after each trial completes move to the...
  35. J

    MATLAB Communication between Arduino and Matlab Help

    I am trying to achieve real time plotting of accelerometer data using an arduino, an Xbee, and Matlab. Usually when the Matlab program gets data, it gets something like this: ~ #� ' X: -2 Y: 20 Z: 4080 t: 33232 ~ !� ' X: 4 Y: 2 Z: 4066 t: 33255 b~...
  36. Futurestar33

    MATLAB What is program is better mathematica or matlab?

    If you are a professor is it better to use Mathematica or Matlab when it comes to publishing papers, which program creates the best graphs. I have origin as well.
  37. B

    Matlab: Open file with typed filename and/or uigetfile?

    Hi all 1. Homework Statement I have a function script for doing some analysis of data from a text file and making some plots. My script takes the filename as an input argument - this is very helpful for running the analysis over multiple files and replicating results. However, I have also...
  38. FrancescoMi

    MATLAB [Matlab] Simulation of Stochastic Process

    Hi all, I have this dynamic: is a Mean Reverting process. I want to simulate the sde with MATLAB but I am a beginner and I have some problems. I show you the code that I have created: %% Simulazione prezzo Geometric Ornstein-Ulenbeck clear all clc %Parameters mu = 0.5; sigma = 0.12; eta =...
  39. L

    MATLAB Integrate y=x/(exp(x)-1) in MATLAB

    Hi, I have a problem of integration in Matlab. I want to integrate the following equation: y=x/(exp(x)-1) and x is from 0 to 1. I use int(y,0,1), but it seems that it does not give correct result. Could you help me how to do it in Matlab? Thanks!
  40. E

    MATLAB Implementation of Fresnel Diffraction in MatLab

    I'm trying to simulate the Fresnel Diffraction in MatLab using the Fast Fourier Transform syntax. But I'm not getting really good diffraction patterns. Here is the code: %% Fourier Transform for G(p, q) g = layer.*exp(((1i*pi)/(lambda*z))*(r_obj)); G = fftshift(fft2(g)); %% Fourier Transform...
  41. kreil

    MATLAB 5 Common MATLAB Error Messages and How to Fix Them - Comments

    kreil submitted a new PF Insights post 5 Common MATLAB Error Messages and How to Fix Them Continue reading the Original PF Insights Post.
  42. kostoglotov

    Multiple Integral Challenge Question, no solution in guide

    I have what I think is a valid solution, but I'm not sure, and when I try to check the answer approximately in Matlab, I don't get a verified value, and I'm not sure if my analytic solution or my approximation method in Matlab is at fault. 1. Homework Statement Evaluate the integral...
  43. H

    MATLAB Series of Standing Waves in Matlab

    %PLOTTING TIME DEPENDENT MOTION OF A STANDING WAVE %Define Parameters a_n = 1; k = 5; w_n = 5; x = 0:0.05:4; t = 1:0.05:20; for j=1:length(t) for i=1:length(x) u(i) = a_n*sin(k.* x(i)).* cos(w_n.*t(j)); %Formula for displacement end pause (0.1) plot(u)...
  44. K

    MATLAB How can i solve these equations in Matlab?

    Equation 1: Equation 2: Equation 3: Equation 4: Equation 5: I would like to solve , (not the one with a star) and i want to define values for p, η0, ηr, θ0, θr. i have tried to solve them, but didn't work, can someone please help and show me step by step?
  45. T

    Matlab storing data and checking conditions

    Homework Statement clear all; close all; totalanswers=zeros(100,4); k= ; flag =0; for i =0:25 a=i; if flag ==1 break; end and so forth for a,b,c,d, etc for a finite set of values all have the break values too. x=[ a,b,c,d]; does some math calculationhere is a...
  46. AMMforce

    MATLAB MATLAB program results discrepancy....

    Hi, I'm using MATLAB R2011a in my project, involving matrices of dimensions up to (70 × 20). I had good results, a time ago. Currently, poor results are generated using the very same code -(of good results)- with same parameters settings & relatively smaller matrices (30 × 20) ! I tried...
  47. H

    MATLAB Looking for a suitable command in Matlab

    I have a vector for instance x=1:200; and three functions of this vector as f(x) and g(x) and h(x) numerically. I want to find the values of the constant coefficients c and d in "cf(x)+dg(x)=h(x)". Is there any way in Matlab to calculate these coefficients directly?
  48. N

    MATLAB 3D Finite different method using matlab

    Can anyone show me how to solve the 3D diffusion equation which has been modeled into FDM by using matlab?
  49. D

    How to solve a very large overdetermined system numerically?

    I am doing a project on image processing and I need to solve the following set of equations: nx+nz*( z(x+1,y)-z(x,y) )=0 ny+nz*( z(x+1,y)-z(x,y) )=0 and equations of the boundary (bottom and right side of the image): nx+nz*( z(x,y)-z(x-1,y) )=0 ny+nz*( z(x,y)-z(x,y-1) )=0 nx,ny,nz is the...
Back
Top