Answered
How do I plot a line with both thick and thin dashes?
Christopher, could it be the plot grid you are talking about? You can turn it on/off using |grid on| and |grid off|. If it is no...

12 years ago | 0

Answered
ode 45 plot of intermediate vraibles of differential equations
Thayumanavan, after the |ode45| call, compute |P|: [t,x]=ode45(@myfunc,Tspan,X0); P = sqrt(x(:,1) + x(:,2)); plot...

12 years ago | 0

| accepted

Answered
Formatting Sea Level Data
Edu, this should do: ndays = length(data(:,1))/2; ndata = ndays*24; Tdata = data(:,1); Rdata = reshape(data(:,2:en...

12 years ago | 0

| accepted

Answered
autosave a image of figure
Suryakanth, in the code you are showing the variable |fullFileName| is not defined, which is why you get an error for the comman...

12 years ago | 0

| accepted

Answered
How to store the result of each iteration of a forloop into an array MATLAB
Chandra, use v{i,j} = tf([K(i*j)],[T(i*j) one(i*j)], [L(i*j)])

12 years ago | 0

| accepted

Answered
How to use a loop to create a function calculate a numerical estimate of the integral?
Georgia, check out the following: function sol = my_int(f, ablim, n) % function f on the given range, using the left-re...

12 years ago | 1

Answered
how to merge two vectors
How about: C = B + [A zeros(1,length(B)-length(A))] assuming that by merge you mean add-merge. If it's just about adjust...

12 years ago | 0

| accepted

Answered
Integration function generates different result by a same expression
Tiger, this is because these are indefinite integrals. Solutions to indefinite integrals can differ by a constant. If you make t...

12 years ago | 0

| accepted

Answered
I am getting error in this code?
Rajasekhar, use f = @(x) cos(x)./x; q = integral(f,0.1,10) There is a problem though with |f| approaching |inf| as yo...

12 years ago | 1

Answered
expected value of 'exp2' fit for an unavailable data point using available data
Hello Mohammad, you can retrieve the curve fitting parameters using |coeffvalues|, define an anonymous function, and then evalu...

12 years ago | 0

Answered
How can I convert this circle drawing code as a Function code? thank you
Maitham, check out the following: function my_circ(imageSize, center, radius) % function definition % Create a logi...

12 years ago | 1

| accepted

Answered
How can I calculate the difference in time (seconds) with datetime?
If you are starting with date strings, use <http://www.mathworks.com/help/matlab/ref/datenum.html |datenum|> to convert dates in...

12 years ago | 1

| accepted

Answered
refreshdata: stop axis updates
Linford, how about refreshing only the data in the loop using the |set| command: h = surf(X,Y,Z) ... set(h,'ZData',ne...

12 years ago | 0

| accepted

Answered
How do I find a solution to (x.^2)/2-10*atan(x) using the Newton-Raphson method?
Hana, there are a couple of issues with your code. This should work: function Xs = newtonroot(Xest) imax = 100; Err ...

12 years ago | 0

| accepted

Answered
problem with 'PLOT' while plotting data acquired from NI DAQ Board
Shailendra, |plot| needs to be spelled lower-case: plot(time, data)

12 years ago | 0

Answered
Why is there an error when I called the function inputting the points
Ehi, you need to define function |f| again in |refine()| to make it work. In other words: function points = refine(x1, x2, ...

12 years ago | 0

| accepted

Answered
How do I plot d using Matlab
Use Nt = 1000 t = linspace(0,100,Nt+1) d = 0.005*sin(0.5*pi*t).*cos(0.5*pi*t) plot(t,d) Any reason you are us...

12 years ago | 0

| accepted

Answered
Subplotting many images in one figure
Edu, this should do: for ii = 1:8 file_name = strcat('Point0',num2str(ceil(ii/4)),'Pic',num2str(ii-4*(ii>4)),'_14012...

12 years ago | 1

| accepted

Answered
is it possible that create a exe. working on computer hasnt installed Matlab ?
Yunus, you need <http://www.mathworks.com/products/compiler/ MATLAB Compiler> (and therefore MATLAB) to create the .exe file. To...

12 years ago | 0

| accepted

Answered
euclidean distance between two cell.
Thomas, use pdist([reshape(cell2mat(Z1),2,3); reshape(cell2mat(Z2),3,3)]) assumming that |Z1| contains two cells of 1-by...

12 years ago | 0

| accepted

Answered
Plot is zeroed out, how to fix this?
Mike, after initializing |u| to zero you enter the first loop that increments |n| all the way to |N|. Which is why you never ent...

12 years ago | 0

Answered
How can I read a complex number vector?
André Luiz, this should do: fid = fopen ('VarName4.txt','r'); ii = 1; while ~feof(fid) acorrente(ii, :) = st...

12 years ago | 0

| accepted

Answered
log scale y-axis for periodogram
Philippe, it is. Use pxx = periodogram(x,window,nfft) plot(10*log10(pxx)) to plot the periodogram.

12 years ago | 0

Answered
vectorize a loop with product and sum operations
Francesco, use bsxfun(@plus, x'*v, x')

12 years ago | 0

| accepted

Answered
a chronometer in GUI
There is an app very much like the one you are looking for on <http://www.mathworks.de/matlabcentral/fileexchange/36365-chronome...

12 years ago | 0

| accepted

Answered
Problem in saving figure
This <http://www.mathworks.com/matlabcentral/answers/100366#answer_109714 answer> illustrates the how-to well. Simply clip the f...

12 years ago | 0

| accepted

Answered
How to change the default background color of a Smith Chart to white?
Hello Floyd, yes it can. Insert myfigure = figure('Color',[1 1 1]); % [1 1 1] corresponds to "white" right before |s...

12 years ago | 1

| accepted

Answered
Dynamic Obstacle in matlab environment
I strongly recommend not to "randomize" the position vector since this results in a non-differentiable function. Start with acce...

12 years ago | 1

Answered
From "Matlab Function" block in Simulink to Workspace in Matlab
Artur, are you referring to the <http://www.mathworks.com/help/simulink/slref/toworkspace.html |simout|> block? That is typicall...

12 years ago | 0

Load more