# Tagged Questions

74 views

### Changing [2,4] into [0,1,0,0,0,1] in Matlab

Good day, I apologize for the very vague title, I didn't really know how to formulate what I want. However, I can explain what I mean: I have a vector v1: ...
100 views

### How to write a function that operates elementwise on a matrix?

I have written a function $f$ in Matlab that receives a number and returns a number, for example function r = myFun(x) r = (exp(x)+3)/2 end I would now like ...
100 views

### Calculate the number of times an angle must be repeated for it to complete a full rotation and for it to close

I'm trying to calculate the number of times an angle must be repeated to make a full rotation and become closed. Example: The internal angle of a pentagon is 108 degrees and it must repeat 5 times to ...
300 views

### Switching from Mathematica to MATLAB: As a text editor?

I have been using Mathematica for almost a year, and the most indispensable feature in Mathematica to me has been the ability to write really nice documents and print them into PDF or TEX files. In ...
143 views

### matlab equal does not work

How to judge whether two whatever is equal? alphat and alpha are two kind big vectors. Why it turns 0, which means they are not equal?
223 views

I had to plot a function, $e_n=\ln(n!)-n\ln(n)+n$, relative to a logarithmic scale. In MATLAB, I could do it simply by using semilogx but in MuPAD I can't find such ...
2k views

### Finding matrix inverse by Gaussian Elimination With Partial Pivoting

Hello guys I am writing program to compute determinant(this part i already did) and Inverse matrix with GEPP. Here problem arises since i have completely no idea how to inverse Matrix using GEPP, i ...
440 views

I would like to plot the multinomial beta from the Dirichlet Distribution wiki page. $$\mathrm{B}(\alpha) = \frac{\prod_{i=1}^K \Gamma(\alpha_i)}{\Gamma\bigl(\sum_{i=1}^K ... 0answers 36 views ### MATLAB plotting issue I posted this question on StackOverflow, but did not get any answers, so hopefully this will work better. Is anyone familiar with plotting in the Matlab SISOtool? For some reason, I cannot access the ... 1answer 223 views ### Matlab: How to Exclude Zero from Domain? I want to plot the wireframe surface of f(x,y)=\frac{x^2-y^2}{x^2+y^2} in Matlab. The code I typed is as follows. x=-0.1:.001:0.1; y=-0.1:.001:0.1; [X,Y]= meshgrid(x,y); ... 1answer 141 views ### Remainder theorem and computation in mat lab Respected Mathematicians, Suppose we are given 10 remainders each of 10 digits for given ten distinct prime bases each of 10 digits. Find the rational number that corresponds to these remainders in ... 1answer 398 views ### MATLAB Fermi-Pasta-Ulam lattice model can't force periodic boundary condition I am building MATLAB code to implement a symplectic integrator using a second order split-step method for the Fermi-Pasta-Ulam problem. The Hamiltonian is in the form: H = sum from i=1 to N ... 1answer 7k views ### Is Sage on the same level as Mathematica or Matlab for graph theory and graph visualization? The context: I'm going to start working on a project that involves running predefined algorithms (and defining my own) for very big graphs (thousands of nodes). Visualization would also be welcome if ... 1answer 338 views ### How to plot graph y=1/x or y=x^2 I am using Octave but I think it applies to MatLab too, so I'm tagging this MatLab since there isnt a Octave tag When I do x=linspace(-5,5,25) y=1/x I get ... 1answer 563 views ### Does MATLAB take care of sparsity itself? Suppose i have matrix of size 1000*1000 with 70% sparsity. I am performing some multiplication, inverse operations upon it. While making calculations, does MATLAB make checks to see if matrix is ... 1answer 971 views ### In this Cholesky Algorithm in matlab, what is the abs function doing We have been told in our homework to implement the following program: function A = Cholesky(A) % Cholesky Decomposition of a Matrix A, so that the resulting matrix L gives A=L*L N = size(A,1); ... 2answers 10k views ### Implement a program in Matlab for LU decomposition with pivoting I need to write a program to solve matrix equations Ax=b where A is an nxn matrix, and b is a vector with n entries using LU decomposition. Unfortunately I'm not allowed to use any prewritten codes in ... 1answer 252 views ### Matlab: Website with a lot of functions to download I am looking for a website that contains a collection of functions, more than Matlab contains, to download I use from Matlab. The extension should be *.m or the code should appear. Thank you! 1answer 6k views ### Find equation of curve fit programmatically in Matlab? In MATLAB, when you plot something, there's a tool available which is called "curve fitting". And if you have a set of data points and a linear correlation, this tool will easily come up with an ... 1answer 1k views ### Numerically Solving a Second Order Nonlinear ODE Okay, I have this not so pretty 2nd order non-linear ODE I should be able to solve numerically.$$f''(R) + \frac{2}{R} f'(R)=\frac{0.7}{R} \left( \frac{1}{\sqrt{f(R)}} - \frac{0.3}{\sqrt{1-f(R)}} ...
For the equation $f(x,y) = x^2/y$ given that $x$ and $y$ are integers What is the easiest/fastest way to find at least one tuple $(x_0,y_0)$ solution to $f(x,y)=4$ or any other number really. I ...