Answered
How to run m-file from another m-file by input string
I do that some times just by doing this: another_script = input('script name: ','s'); % and type the name of your other scr...

7 years ago | 0

Answered
matrix or array composed by zero-values
try with any(all(M)) any(all(M)) = 0 when every element of M equals 0

7 years ago | 0

Answered
How to view an image from the side?
Take a look at the built-in function _view_: help view doc view

7 years ago | 0

| accepted

Answered
If else if statement problem
You can solve the issue rounding the value of _c_: %Problem occurs here, if c = 1, else statement is displayed instead e...

7 years ago | 1

| accepted

Answered
cell array to string array
If your cell array is this: fp31={'#CC','#CB','#CN','#CO','#CP','#CF','#CS','#CI','#CQ','#CW'}; access the elements usin...

7 years ago | 1

Answered
how do i plot a graph with pixel matrix?
It is not very clear what you want, but I think it could be this: Result = [368.8496 41.0974]; Result1 = [18.8326 96...

7 years ago | 0

Answered
How can I change the name of my vector of each iteration?
Use _eval_: S = rand(3,1); % sample data to test the script n = length(S); for ii = 1:n; a = M(ii,1); b =...

7 years ago | 0

| accepted

Answered
Multiply a 3D matrix with 2d matrix to get a vector
The only solution that suits the dimensions of the matrices is this: Y = rand(3);% Y is a 3x3 matrix Z = rand(6,1);% Z i...

7 years ago | 0

Answered
convert time stamp into minutes or seconds
Take a look at this thread, it deals right with your problem. <http://www.mathworks.com/matlabcentral/answers/108833-read-tim...

7 years ago | 0

Answered
Plotting a 2D matrix
Maybe you are thinking no something like this: M=rand(300,42); % your data here [xx, yy] = meshgrid(1:42,1:300); ...

7 years ago | 0

Answered
Reading specific data from an excel file
I think it would be better to read just once the *.xls file, since it is a time-consuming process. And moreover, after reading ...

7 years ago | 0

Answered
how can i go back to the fist choose again with out termination after finshing the first task?
Use a while-loop: mynumber = 0; while (mynumber ~= 3) % condition to get out of the loop. Change to your n...

7 years ago | 0

| accepted

Answered
How do I convert a .m file into .exe file??
use the _deploytol_ to create an *.exe from your project. Take a look at the documentation, where you will find examples to g...

7 years ago | 0

| accepted

Answered
why the error is coming?
who is _x_? That message is the result of trying to access an non-existent element of the array, such as x(0). Make sure _...

7 years ago | 0

| accepted

Answered
How can I save a .dat file?
take a look at the documentation of _fprintf_ doc fprintf You will find right what you need

7 years ago | 0

Answered
How declare a global vector
The fact of being a global variables has nothing to do with its dimension. The following is perfectly valid: global v v...

7 years ago | 0

Answered
Problem in while loop when input is characters or words
You do not say who is either _W_ or _choiceNum_, but with the two variables in play, you can do it like this. Watch the capit...

7 years ago | 0

Answered
how i divide n images present in a folder into 4 equal parts
Filename=strcat('fruits\',srcFiles(i).name); I=imread(Filename); imshow(I) [x,y, z]=size(I) I_1 = I(1:x/2,1:...

7 years ago | 1

Answered
How do i create a hole or cut a certain portion of a plane in GUI?
x = [0 100 100 0]; y = [0 0 100 100]; z = [0 0 0 0]; fill(x,y,'b') x_hole = [40 60 60 40]; y_hole = [40 40 60 6...

7 years ago | 0

Answered
Significance of the (.) operator
The means the product is performed element-wise in both matrices on wither side of the product sign: Example: a=[1 2 3];...

7 years ago | 0

Answered
Help writing a simple function
You should do as Azzi Abdelmalek says, anyway, here is your code: if x<4 f = -1; elseif x>=4 && x<=4 f = ...

7 years ago | 0

Answered
How can I shift rows and columns, and also replicating Sub matrixes.
A = magic(4); D = [A(end,:); A(1:end-1,:)]; % shift rows down D = [D(:,3:end) D(:,1:2)]; % shift colums leftx2 ...

7 years ago | 0

Answered
How can save sveral images using different names in a single pogram
Adapt the following to your needs: N_pics = 10; % change this to your needs for k=1:N_pics pic_left = sprintf('l...

7 years ago | 1

| accepted

Answered
Plotting a Hexagon shape in matlab
To Draw any polygon: scale = 5; N_sides = 6; t=(1/(N_sides*2):1/N_sides:1)'*2*pi; x=sin(t); y=cos(t); x=scal...

7 years ago | 0

| accepted

Answered
Looping over function string arguments
In the second method you are passing a cell array as input argument. Try this: interpolation={'bilinear', 'bicubic'}; ...

7 years ago | 1

| accepted

Answered
Can Letter U appear in one amino acids sequence?
As you can see, for example in this link: http://www.hgvs.org/mutnomen/codon.html U can not be in the sequence

7 years ago | 0

| accepted

Answered
Can Letter U appear in one amino acids sequence?
Your sequences are not of the same length, when A is restricted to same size than B, you do not get the error: A = 'MGCAEGK...

7 years ago | 0

Answered
how to compute separate line 2 dimensional points
Once you have the plot, go to _tools_ -> _Basic fitting_ select the data (1 or -1 in your case), linear and click in the bott...

7 years ago | 0

Answered
How to rename variables in a loop?
you are not using _eval_ in the right way. You should do: x=3; eval('a = x') a = 3 Adapt the code t...

7 years ago | 0

Load more