Respondida
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...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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)])

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

Respondida
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...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 1

| aceptada

Respondida
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...

más de 12 años hace | 1

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
hi..i am writing the code for recursive mean separate histogram equalization..i am getting an error called "Undefined function 'averpixcal' for input arguments of type 'double'."when calling the function 'averpixcal'..code is attached for reference
Vishwas, a couple of thoughts: * Comments in MATLAB appear after percent symbols. E.g., |% This is a comment| * Is the code ...

más de 12 años hace | 1

Respondida
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 ...

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

Respondida
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, ...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

Respondida
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...

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

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

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 1

| aceptada

Respondida
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...

más de 12 años hace | 1

Respondida
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...

más de 12 años hace | 0

Cargar más