Answered
Calculator by matlab sin, cos, tan
You wrote the sin. cos and tan funcitons beggining with with capital letters: Sin, Cos and Tan in your code. Write the fun...

9 years ago | 0

| accepted

Answered
change nested for to vectorise
xgrid=1:100; ygrid=1:100; X=[10 20 30 40 50]; Y=[55 65 75 85 95]; % to start with, there is no need of a 3...

9 years ago | 0

Answered
How to add an unknown amount of number in matlab?
Not sure about your intentions, i created a dummy cell and a solution for what i think is your problem: vect=cell(5,3);% in...

9 years ago | 0

Answered
How to show an image or a plot in a different window from my gui?
call a different figure before presenting the image: figure, image(your_image) or figure, plot(your_data)

9 years ago | 0

| accepted

Answered
save answers for different values used in a while loop in an array of (2,n)
In your second function, you defined k=1; and the condition in the while loop is while (p>k) which is not fulfill...

9 years ago | 0

Answered
Force scientific notation in axes
It doesn't appear to be possible: <http://stackoverflow.com/questions/13326894/force-exponential-format-of-ticks-like-matlab-...

9 years ago | 0

Answered
Saving a structure to Excel
Try this out (adapt it to your need) a.b.c.d = rand(16,1); a.b.c.e = rand(16,1); my_last_field = fieldnames(a.b.c);...

9 years ago | 3

| accepted

Answered
Saving a structure to Excel
take a look at this linK: <http://www.mathworks.com/matlabcentral/answers/13069-export-to-excel> Where is clearly stated: ...

9 years ago | 0

Answered
How to open a gui fig file from another gui?
If what you want to do is open another GUI, call its associated *.m, not the *.fig.

9 years ago | 1

| accepted

Answered
display 4 consecutive numbers in array
a= [9 10 11 12 17 18 19 20 23 24]; for k=1:(length(a)-3) % k=2 if a(k:k+3)==(a(k):a(k)+3) fprintf('re...

9 years ago | 0

Answered
Calling a function within another function?
Just call them from within _tictactoe_: In your _tictactoe_ function: function your_outputs = tictactoe(your_inputs) ...

9 years ago | 0

Answered
how to process equation in summation
Tl = 0; % initilization of summation alphaNs = 2; for k = 01:alphaNs Tl = Tl + abs(x(k)^2); end Tl = (1/alp...

9 years ago | 0

| accepted

Answered
graphing my first PDE
take a look at the documentation. doc pdepe will present a very good example. This same example is explained in more de...

9 years ago | 0

Answered
How to output a value of an array for a specific value of time?
idx = find(t==1); v(idx) or in a single line: v( find(t==1) )

9 years ago | 0

Answered
is there any way to did not show the grid of pcolor plot?
I think you should try: grid off after you call _pcolor_

9 years ago | 0

Answered
symbolic integration with undefined variable
Point out that z>0 like this: >> assume(z>0); >> b=int(a, r, 0, r) b = -2*pi^2*z*(log(z) - log(r + (r^2 ...

9 years ago | 1

| accepted

Answered
low speed of 'ismember' function
Depending on your data, you might try to code your own function avoiding some conditions and calls to sub-functions within the _...

9 years ago | 0

Answered
Plot an strange equation
10.75-8.5567 ans = 2.1933 Then: my_equation = '2.1933-158.34.*y+2112.07.*y.^2-12211.07.*y.^3-29.44.*...

9 years ago | 0

| accepted

Answered
How do you calculate the volume of tumor from a series of MRI slices contaning tumor
You have to know the scale of the images. Once you know the scale (equivalence between pixel-size and mm, for example), you j...

9 years ago | 0

| accepted

Answered
Indexing matrix to get corresponding values for condition,store in a new matrix each time?
It is not very clear what you want, but I think it has to be something like this: sat_look_tcs=[sat_elev;sat_azim;range]; ...

9 years ago | 0

Answered
How to print result in MATLAB?
define your _Name_ array as a cell, then: Name={'ABC-8' 'S8' 'EG8'}; Thick=[25 16 12]; Z =cell(numel(Name),1); for...

9 years ago | 1

Answered
Why the trigonometry results are different
The different result between tan(90) and tan(pi/2) is obvious. 1.6331e+16 might be considered equal to _inf_

9 years ago | 1

Answered
Problem in string-number concatenation
Define your _A_ array as a cell using brackets _{_ _}_: A={'E';'F';'G';'H';'I';'J';'K';'L';'M';'N';'O';'P';'Q';'R';'...

9 years ago | 1

Answered
combining variables into one variable
your_Combination = zeros(28,125,121); % initialize the final variable Now you have several options depending on your data: ...

9 years ago | 0

Answered
grabbing number after decimal
N = 1234.5; R = 10*(N-floor(N)) R = 5

9 years ago | 1

Answered
Reflect a triangle given a mirror line
Create a m-file with this function: function S = symetric_P_about_line(P,m,n) % line of symmetry: y = m*x + n; Md...

9 years ago | 2

| accepted

Answered
HOW TO ENCODE AN 8BIT VALUE FROM A MATRIX
M=randint(256,256,[0,256]); disp(N) N=zeros(size(M)); for k=1:256 for l=1:256 N(k,l) = str2double(d...

9 years ago | 0

Answered
Wrong equastion of XY dependence
Instead of your definition of _x_, try the folowing one: x= -5:.01:15; % array of 2001 elements, your definition were a mer...

9 years ago | 0

Answered
how can i put a label for columns in an array?
x=[1 5 8 0 6 1]; C=cell(2,length(x)); for k=1:length(x) C{1,k} = sprintf('x%g',k); C{2,k} = x(k); e...

9 years ago | 0

Answered
Error: File: hh.m Line: 148 Column: 1 Function definitions are not permitted in this context.
You have to save your functions in a different m-file and then make the call to them from your script. Matlab does not allow min...

9 years ago | 0

Load more