Answered
Merging .mat files into 1 file, only containing variables in array form
the following is really basic but it does what you asked for, there are some points that you may want to improve but improvement...

9 years ago | 0

Answered
How to sum same size cell blocks?
Hi Xiaohan first get the size of inpt [sz1 sz2]=size(inpt) and sum the cell2mat version of inpt sum(resh...

9 years ago | 0

Answered
Merging .mat files into 1 file, only containing variables in array form
Ok, If you have exactly the same variable names in different .mat files and attempt loading them, you have to change variabl...

9 years ago | 0

Answered
How to change the format of the numbers displayed on in a MATLAB plot?
1. in function getTree % add text to tree text(Z(1),X(1),mheight+1,[num2str(treeID) ',' num2str(strength)],'H...

9 years ago | 0

Answered
Important Code for a program
this is the link you want: <https://uk.mathworks.com/matlabcentral/fileexchange/29373-dtmf-tones-detection> if you find th...

9 years ago | 1

| accepted

Answered
e^x/x
function plot doesn't work with input type syms Instead try the following x=[-10:0.0001:10]; y=exp(x)./x; plot(x,y...

9 years ago | 1

| accepted

Answered
How can solve the 2d transient heat equation with nonlinear source term?
have you seen these links? 1. <https://uk.mathworks.com/help/pde/examples/inhomogeneous-heat-equation-on-a-square-doma...

9 years ago | 4

Answered
how can i get the fft result at specific freq?
the FFT is the fast implementation of the DFT function [Xk] = dft(xn,N) % Computes Discrete Fourier Transform % -----...

9 years ago | 1

Answered
Equation how to evaluate and obtain a value
just change the type syms x f(x) = exp(5*x); df(x) = diff(f,x); double(f(2)) = 2.202646579480672e+04...

9 years ago | 5

Answered
How to set a marker at a desired location on a plot
use a vector index, let it be k, instead of the x reference of the plot. 1. plot and add a marker x=linspace(-4,4);...

9 years ago | 3

Answered
How to change the format of the numbers displayed on in a MATLAB plot?
it would help a lot that you show the code, because the graphs have handles that you can change. Is it possible for you to po...

9 years ago | 0

| accepted

Answered
Evaluate integral of vectorial function
if you choose c values that include or are too close to a pole, the function integral may trigger error warning because either ...

9 years ago | 0

| accepted

Answered
Solving Inequalitis in Matlab
perhaps you'd consider upgrading to R2016 eq=x>5^.5 eq = 5^(1/2) < x solve(eq,x) = 5^(...

9 years ago | 0

Answered
can any one explain this to me
the following examples may help x = strmatch('max', char('max', 'minimax', 'maximum')) returns x = [1; 3] sinc...

9 years ago | 0

| accepted

Answered
How can convert two (file.fig) to (file.jpg) in the same time?
put all figures to translate to .jpg in a same folder put all .fig in same folder cd 'folder_figures' get in the f...

9 years ago | 0

| accepted

Answered
External Mode for a custom STF
have you tried either removing the ')' at the end of the previous line pointed by the error, the line ending with boolean_T *...

9 years ago | 0

Answered
How to find time of flight
1. <http://practicalphysics.org/measuring-speed-sound-using-echoes.html> suggests to measure distance to a sound reflectin...

9 years ago | 0

Answered
how to solve this differential equations with dsolve
1. solving the system syms x(t) y(t) z=dsolve(diff(x)==-y-2*y,diff(y)==-x-2*y) z.x = C2*exp(-3*t) - 3*C1*exp...

9 years ago | 0

Answered
How to restrict plots of two variables to a chosen value of a third variable?
so do you want to slice a 3D plot? t = 0:pi/50:10*pi; st = sin(t); ct = cos(t); figure(1); plot3(st,ct,t) <</ma...

9 years ago | 0

Answered
Merging .mat files into 1 file, only containing variables in array form
use the save function specifying the variable names: 1. let's say you have saved your 5 in these 5 .mat files save va...

9 years ago | 2

Answered
Why is this code saying i have a wave at 2 KHz and 6Khz??
For real only time signals, the FFT is only meaningful up to fs/2 where fs is the sampling frequency. For real only time sig...

9 years ago | 2

| accepted

Answered
How to copy each row of a vector according to the number in another vector ?
Hi the following lines do what you are asking: A=[1 2;3 4;5 6;7 8;9 10] qc=[1;0;2;2;0] qc=qc' L=find(qc>0) ...

9 years ago | 1

| accepted

Answered
How can I change the 'radbas' transferFcn ?
ok the reason why radbas.m is called radial function is not because when plotting the outcome on a plane it should look like ...

9 years ago | 0

| accepted

Answered
I have the following code (recognizing individuals pixels of a matrix). For a high number of images, this is very time consuming. Therefore, ¿Could the loop be avoided ? Thanks!
there is no need to initialise the void V, go straight to the indices returned from functions * find( zeros()) * find( non...

9 years ago | 0

Answered
4D plot - representing 3 variables function
KSSV answer is still a 3D plot only. You fix constant one of the x y z, replace the constant variable with the 4th variable a...

9 years ago | 5

Answered
How can I change the 'radbas' transferFcn ?
you probably missed using the coordinates out of meshgrid rather than the ranges x and y. Try adding [X,Y]=meshgrid(-3:...

9 years ago | 0

Answered
Grouping based on similarity and indices
[v_sorted i_sort]=sort(v) in v_sorted same angles are together, all values sorted in ascending order i_sort contains the...

9 years ago | 0

| accepted

Answered
how can a script that reads a number of strings from standard input and prints them in reverse order be written ?
Neither FOR loops nor flipr needed, just use the right indexing: str='how can a script that reads a number of strings from ...

9 years ago | 0

Answered
can anyone help me... Write a MATLAB script (called count.m) which reads a string from standard input and then counts the number of words in that string
assume only spaces, comas, full stop, .. are used between words but not before the very first word and the very last word, then ...

9 years ago | 1

Load more