Answered

Switch columns in a matrix without a loop

for exchanging two columns 3 - 9 : A = randi(20,4,10); % A random 4 by 10 matrix of integers A(1,:)=[1 2 3 4 5 6 7 ...

Switch columns in a matrix without a loop

for exchanging two columns 3 - 9 : A = randi(20,4,10); % A random 4 by 10 matrix of integers A(1,:)=[1 2 3 4 5 6 7 ...

9 years ago | 0

Answered

I WANT TO SOLVE THE EQUATION for x: x*exp(x)=(a1-x)*a2*a3 . Here a1 and a3 are matrices and a2 is a constant. I cant solve the equation using solve

True, indeed. Not only for (A,B) = (11,13) and (3,-6), but for a wide range of other set, including the given coefficients.....

I WANT TO SOLVE THE EQUATION for x: x*exp(x)=(a1-x)*a2*a3 . Here a1 and a3 are matrices and a2 is a constant. I cant solve the equation using solve

True, indeed. Not only for (A,B) = (11,13) and (3,-6), but for a wide range of other set, including the given coefficients.....

9 years ago | 0

| accepted

Answered

I WANT TO SOLVE THE EQUATION for x: x*exp(x)=(a1-x)*a2*a3 . Here a1 and a3 are matrices and a2 is a constant. I cant solve the equation using solve

The equation you wrote is x*exp(x)=(a1-x)*a2*a3 y= x*exp(x)-(a1-x)*a2*a3 y= x*exp(x)-a1*a2*a3 +x*a2*a3 Let: a1*...

I WANT TO SOLVE THE EQUATION for x: x*exp(x)=(a1-x)*a2*a3 . Here a1 and a3 are matrices and a2 is a constant. I cant solve the equation using solve

The equation you wrote is x*exp(x)=(a1-x)*a2*a3 y= x*exp(x)-(a1-x)*a2*a3 y= x*exp(x)-a1*a2*a3 +x*a2*a3 Let: a1*...

9 years ago | 0

Answered

how to find the sum terms in of binomial expansion

The general steps to find such a summation are: - Start a loop over r, - Calculate each term as a function of (r), - I...

how to find the sum terms in of binomial expansion

The general steps to find such a summation are: - Start a loop over r, - Calculate each term as a function of (r), - I...

9 years ago | 1

| accepted

Answered

how do i display this particular matrix in a separate text file in the below mentioned format?

Use the code below after adding your filename with its path: clc clear filename = 'your_filename.txt'; ...

how do i display this particular matrix in a separate text file in the below mentioned format?

Use the code below after adding your filename with its path: clc clear filename = 'your_filename.txt'; ...

9 years ago | 0

Answered

sum(w) and ones(1,size(w,2))*w' results totally different numbers

The line ones(1,size(w,2))*w' means creating a ones matrix with dimensions (1,size(w,2)) multiplied with w', and ...

sum(w) and ones(1,size(w,2))*w' results totally different numbers

The line ones(1,size(w,2))*w' means creating a ones matrix with dimensions (1,size(w,2)) multiplied with w', and ...

9 years ago | 0

Answered

How to input a matrix of unknown dimensions into a function?

A is an input argument passed from function call function_name(A). SO, DELETE THIS LINE from the beginning, you do not need to i...

How to input a matrix of unknown dimensions into a function?

A is an input argument passed from function call function_name(A). SO, DELETE THIS LINE from the beginning, you do not need to i...

9 years ago | 0

| accepted

Answered

Why the loop return only the last element ?

It is a little tricky how loops are working in any program, aren't they? You used subplot and set and get within the same loop, ...

Why the loop return only the last element ?

It is a little tricky how loops are working in any program, aren't they? You used subplot and set and get within the same loop, ...

9 years ago | 0

| accepted

Answered

MATLAB solve function is taking a very long time

Sometimes trying the (simplify) command successively after each solve command, helps making the syms math incredibly faster. It ...

MATLAB solve function is taking a very long time

Sometimes trying the (simplify) command successively after each solve command, helps making the syms math incredibly faster. It ...

9 years ago | 0

Answered

i've an image of size 185x256 and i've divided the image into discrete blocks having block rows 16 and block columns 16. when i access the blocks in a loop it says index exceeds matrix dimension...

Just add clear at the very top of the code. Also these issues: Line 26: change (oneBlocl) to (oneBlock) Li...

i've an image of size 185x256 and i've divided the image into discrete blocks having block rows 16 and block columns 16. when i access the blocks in a loop it says index exceeds matrix dimension...

Just add clear at the very top of the code. Also these issues: Line 26: change (oneBlocl) to (oneBlock) Li...

9 years ago | 0

| accepted

Answered

how to plote 3 variable on 2D plot

But the single x-axis can't hold more than one variable, unless: * The two (or more) variables have the same units, as the r...

how to plote 3 variable on 2D plot

But the single x-axis can't hold more than one variable, unless: * The two (or more) variables have the same units, as the r...

9 years ago | 0

| accepted

Answered

2d index to 3d array

First note that adding a third dimension that is interpreted as (color) in a grayscale (2-D matrix) image is a logically false t...

2d index to 3d array

First note that adding a third dimension that is interpreted as (color) in a grayscale (2-D matrix) image is a logically false t...

9 years ago | 0

Answered

Subscripted assignment dimension mismatch.

In the line C=-n.*sqrt(pi.*k./(2.*R(mg))).*besselj(n+0.5,k.*R)+k.*sqrt(pi.*k.*R(mg)./2).*besselj(n-0.5,k.*R(mg)); use R...

Subscripted assignment dimension mismatch.

In the line C=-n.*sqrt(pi.*k./(2.*R(mg))).*besselj(n+0.5,k.*R)+k.*sqrt(pi.*k.*R(mg)./2).*besselj(n-0.5,k.*R(mg)); use R...

9 years ago | 0

| accepted

Answered

Number of lines in a txt file (empty lines computed)

Check this out: E=textread('Your_File.txt','%s', 'delimiter', '\n'); % reads strings, white-space or delimiter-sepa...

Number of lines in a txt file (empty lines computed)

Check this out: E=textread('Your_File.txt','%s', 'delimiter', '\n'); % reads strings, white-space or delimiter-sepa...

9 years ago | 0

| accepted

Answered

matlab to excel back to matlab

So you want to write a program in Matlab that writes 3 values in 3 cells in an Excel file? OR you need to read 3 cells from an e...

matlab to excel back to matlab

So you want to write a program in Matlab that writes 3 values in 3 cells in an Excel file? OR you need to read 3 cells from an e...

9 years ago | 0

Answered

How to find parameters of a time series by MLE

Hi. The equation listed in the figure appears so uneasy to handle. That is true since it has cyclic-like behavior with three...

How to find parameters of a time series by MLE

Hi. The equation listed in the figure appears so uneasy to handle. That is true since it has cyclic-like behavior with three...

9 years ago | 1

| accepted

Answered

Read in File with Letter, Number, and Quotation Marks

f=fopen('Your_File','r'); Readings=fscanf(f,'c',[1,inf]); then change the contents of (Readings) either to numbers using...

Read in File with Letter, Number, and Quotation Marks

f=fopen('Your_File','r'); Readings=fscanf(f,'c',[1,inf]); then change the contents of (Readings) either to numbers using...

9 years ago | 0

Answered

can change the name of txt. file not manually

If your filenames are part1_1.txt, part1_2.txt, part1_3.txt.. etc., and intersect_1.txt, intersect_2.txt.. etc., and w...

can change the name of txt. file not manually

If your filenames are part1_1.txt, part1_2.txt, part1_3.txt.. etc., and intersect_1.txt, intersect_2.txt.. etc., and w...

9 years ago | 0

Answered

How to update the variable of a function using a dialogbox?

Try the (while) loop with simple criterion, as: clear all; close all; prompt = {'CORRELATION SIZE:'}; ...

How to update the variable of a function using a dialogbox?

Try the (while) loop with simple criterion, as: clear all; close all; prompt = {'CORRELATION SIZE:'}; ...

9 years ago | 1

| accepted

Answered

Ploting 3D flow data (4D plot)

Logically, no 4-D plot can be made sensible to us (unfortunately, we are stuck to see and understand 3-D world, only). So even i...

Ploting 3D flow data (4D plot)

Logically, no 4-D plot can be made sensible to us (unfortunately, we are stuck to see and understand 3-D world, only). So even i...

9 years ago | 0

Answered

How I can extend this function

The function you wrote above has an error at I = 1:1:6; it should be I = 0:1:6; % or simply I = 0:6; ...

How I can extend this function

The function you wrote above has an error at I = 1:1:6; it should be I = 0:1:6; % or simply I = 0:6; ...

9 years ago | 0

Answered

-log(SNR) does it make any difference?

Easily decompose the log argument! For any (ratio) R=S/N, then (please note that I highlighted the math formulas like codes, yet...

-log(SNR) does it make any difference?

Easily decompose the log argument! For any (ratio) R=S/N, then (please note that I highlighted the math formulas like codes, yet...

9 years ago | 0

| accepted

Answered

Error in using while loop?

Please do not use ( less than as < or greater than as > ) when using symbolic math. Instead use: while (gt(m,iter) && (lt...

Error in using while loop?

Please do not use ( less than as < or greater than as > ) when using symbolic math. Instead use: while (gt(m,iter) && (lt...

9 years ago | 0

Answered

plot function Too many input arguments.

This function works fine and nothing's wrong, it worked here correctly. The output_noise is (1 by 3000) and its maximum is ~ 1 e...

plot function Too many input arguments.

This function works fine and nothing's wrong, it worked here correctly. The output_noise is (1 by 3000) and its maximum is ~ 1 e...

9 years ago | 0

Answered

How to move a point on x-axis

Try the following, and modify is needed: close all axis ([0 20 0 40]) hold for x=0:20 plot(x,0,'...

How to move a point on x-axis

Try the following, and modify is needed: close all axis ([0 20 0 40]) hold for x=0:20 plot(x,0,'...

9 years ago | 0

Answered

How to convert an GF(Galio Field) array to uint8 array?

If it was (Galois) Field, used in advanced fields as cryptography and coding theory, please seek the reference page: < http...

How to convert an GF(Galio Field) array to uint8 array?

If it was (Galois) Field, used in advanced fields as cryptography and coding theory, please seek the reference page: < http...

9 years ago | 0

Answered

how to convert gray scale image into rgb image?

Use colormap types, since you are interested with a colored region of interest, I think any colormap format suffices. Example: ...

how to convert gray scale image into rgb image?

Use colormap types, since you are interested with a colored region of interest, I think any colormap format suffices. Example: ...

9 years ago | 1

Answered

how to put the obtained 'k' value in a separate array?

Simply use D1= overload(k) If (k) was not a positive integer you cannot use it as a matrix index. It is the function ...

how to put the obtained 'k' value in a separate array?

Simply use D1= overload(k) If (k) was not a positive integer you cannot use it as a matrix index. It is the function ...

9 years ago | 0

Answered

how to assign a variable using a string

Try (genvarname) with (eval) functions. Example (alter the example below to your use, i.e., instead of eval([b]) use eval([b = '...

how to assign a variable using a string

Try (genvarname) with (eval) functions. Example (alter the example below to your use, i.e., instead of eval([b]) use eval([b = '...

9 years ago | 0

Answered

Making a magic square matrix singular

I don't think details are required since A=magic(n)-ones(n)*((1+n*n)/2) is changed into an antisymmetric matrix, any such...

Making a magic square matrix singular

I don't think details are required since A=magic(n)-ones(n)*((1+n*n)/2) is changed into an antisymmetric matrix, any such...

9 years ago | 1

| accepted