Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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); ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 2

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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') ...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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. ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

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

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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: ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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'...

plus de 12 ans il y a | 2

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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]);...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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; ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

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

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

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

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Charger plus