Answered
how to store the result of a dos command into a file in matlab
Dear Uday Teja, "Iperf_command" is not a valid "dos" command. You should use keyword "help" in dos command prompt to get the lis...

12 years ago | 0

Answered
Help with Taylor series
Dear Dav, here is the code to do it up to fifth order: syms a b x y y = (a + b * x)^(1/2); TaylorSeries = taylor(y); ...

12 years ago | 1

| accepted

Answered
A way to get MatLab to solve inequality from left to right and not by order of operation?
Dear MAB, you can solve equation in your desired sequence by using brackets. You can do like this: Leftside = (-3 + 1) * 10...

12 years ago | 0

Answered
how can i plot radiation pattern in cartesian coordinate in matlab ?
Dear Naveedp, here is the code you can use for plotting: theta = -90:90; theta_rad = degtorad(theta); r = 1; eleva...

12 years ago | 1

| accepted

Answered
Mean of matrix by columns
Dear Alessandro, you can use MATLAB function "mean" for this purpose. Here is description: <http://www.mathworks.com/help/matlab...

12 years ago | 0

Answered
How does '3' differ to 3?
Dear Jonagorn, 3 is a number however '3' is a character. So when you try to get numeric value of a character then MATLAB convert...

12 years ago | 2

Answered
Error using horzcat - CAT arguments dimensions are not consistent.
Dear Biji, here you have dimension of "cumsum(P, 2)" 4x5 while "zeros(5, 1)" has dimension of 5x1 so you can see dimensions of b...

12 years ago | 1

Answered
Help with If statement in the Fibonacci sequence
Dear Sarah, here is correction in your code: function fib = FunctionFib2(n) if n > 30 error('Number is too big') ...

12 years ago | 0

Answered
how to get an output from the command window into a text file?? plz answer ,its very necessary
Dear Srinivas Sri, for example you have coordinates in the form of 'x' and 'y' array then you can write it in a text file using ...

12 years ago | 0

| accepted

Answered
My for loop is replacing all values of my array with the last iteration.
Dear Satenig, I think third loop is unnecessary and it is the reason for for changing all the values back to last matrix value. ...

12 years ago | 0

| accepted

Answered
Question about how to make something that points to a matrix
Dear Gilmar, here is the code: x = [11, 3, 5, 7, 1, 8, 9]; y = [1, 2]; if max(y) > length(x) error('Maximum co...

12 years ago | 0

| accepted

Answered
Flipping Values (1 Line)
Dear Rooy, here is the desired code without for loop: a = input('Input first value: '); b = input('Input second valu...

12 years ago | 0

Answered
Using For loop to convert a message. Help pls.
Dear Micheal, here is the code: message='abc'; for i=1:1:length(message) if message(i)=='a' code(1)='1...

12 years ago | 0

| accepted

Answered
how we can define piecewise function in matlab?
Dear ebi, You need something like this if I understood correctly: syms f f1 t = input('Enter value of t: '); % Assumi...

12 years ago | 0

Answered
Reference excel spreadsheet column to retrieve data from corresponding row
Dear J. Ryan Kersh, Walter Roberson's answer is correct. If you have confusion you can use the following code directly: ...

12 years ago | 0

Answered
Help with for loop - How do I use indices to denote intervals?
Dear Kristen, you can do like this: A = [1:600]'; B = [1:24]'; count = 0; for i = 1:2:length(B) multicativ...

12 years ago | 0

Answered
I have 2 values of population say 30000 for 2001 and 50000 for 2011, I want the population values for all the years between 2001 to 2011 following the trend of population rise from 2001 to 2011
Dear Sourangsu,Using interplotation you can do like this: Known_year = [2001 2011]; Known_year_population = [30000 50000...

12 years ago | 0

| accepted

Answered
How to plot phase and amplitude spectrum after doing fourier transform?
Dear Bilal, You can plot in the following way the amplitude and phase of X: figure, plot(w, abs(X)), title('Amplitude plot'...

12 years ago | 2

Answered
How do I read in a text file and sort it by a column
Dear Aaron, the problem here is that function "textscan" output data in the form of cell array which you must convert first into...

12 years ago | 0

| accepted

Answered
High order equation Solving
Dear Yaman, Here is the solution of your problem in symbolic form: syms X Y Z p x y z t dx dy dz A = sym('A%d', [1 21]);...

12 years ago | 0

| accepted

Answered
How can i show two graphs same
Perhaps you want something like this(if I understood correctly): x1 = 1:500; y1 = x1.^2; x2 = 1:200; y2 = x2.^2; ...

12 years ago | 0

Answered
Integration of the unknow variable
Dear Jamal Ahmad, You are using "int" in wrong format. See <http://www.mathworks.com/help/symbolic/int.html> g = int(f,0,in...

12 years ago | 1

Answered
How do I calculate the kynetic energy in deceleration
Dear Marco, here is code for kinetic energy in deceleration: mass = 20; velocity = 10:-0.1:1; KE = 0.5 * mass * veloc...

12 years ago | 0

| accepted

Answered
Bug in tdfread() / str2num()?
Dear Steffen, I checked X = str2num('Xrw_LowConc_QCCmpds_AllMeanFt_q01'); but got empty value because it is not valid s...

12 years ago | 0

Answered
plot of inverse fourier transform
If you just need shift the x-axis with respect to maximum amplitude position in your Inverse Fourier Transform spectrum then you...

12 years ago | 0

| accepted

Answered
dot and tab delimiting
Here is an example of using dot delimiter: a = 599.666; b = num2str(a); c = strsplit(b, '.'); first_element = str2...

12 years ago | 0

| accepted

Answered
How to write into txt file
Your code is working fine I checked. There is no problem with your code but it is windows permission problem. You should not sav...

12 years ago | 1

Answered
how to fix "In an assignment A(I) = B, the number of elements in B and I must be the same"
You should not use same name for variable and array. You are using "y1" as variable as well as an array later in for loop. So yo...

12 years ago | 0

Answered
How to link two functions
Hey here is your merged code: curvesumi = 0.2017; curvesumo = 0.1377; distar = 0.6031; dostar = 0.6577; mat...

12 years ago | 0

| accepted

Answered
I would like to create a for-loop for a vector T1 consisting of 21 elements where all are zero except the first, in order to get T2, which also has 21 elements, (temperature elements).
Dear Gustaf, still I have confusions in understanding the problem. However as I understood I wrote a small code which you can ru...

12 years ago | 0

| accepted

Load more