Answered
how can i count the number of times that the symbol appears?
You initialize your counter in each iteration. After any one iteration the counter will be either 0 or 1, but either way the nex...

4 years ago | 0

Answered
How to fix 13.3 MISRA-C 2012 Polyspace Warning?
Your x and y are automatic variables, local to func(). What is the purpose of incrementing them just before returning ? Anyhow...

4 years ago | 0

| accepted

Answered
Dataline [n1 n2] didn't work
Unfortunately in your release, DataLines only permitted a single value, not a range of values. PerLine = 343; DataLines = [300...

4 years ago | 1

Answered
multiply Polynomial with constants
syms c1 c2 x (2*x+1)*(c1*x + c2*x^2) collect(expand(ans),x)

4 years ago | 1

Answered
Plotting multiple graphs using "imagesc"
imagesc() works by doing image() and then setting the CLim property of the axes. If you were to imagesc() more than one item in ...

4 years ago | 0

| accepted

Answered
How would I create a curve fit line and smooth the data on a surf plot
If you were to find() the locations of the non-zero pixels, then you could use boundary() on the coordinate pairs to get an outl...

4 years ago | 0

Answered
issue using 'sort'
You are expecting that the second output of sort() will tell you where each element of the input goes in the output. You are exp...

4 years ago | 0

Answered
What is the modification needed in the below code
Look at the first set of code. You initialize z = 0 outside both loops. In the inner loop you add 1 to each z, ending when z >= ...

4 years ago | 0

| accepted

Answered
Synthax Question for Equation
Rules for dots: The dotted versions of the operators are generally different operators than the non-dotted versions. The dotted...

4 years ago | 0

Answered
Polynomial fit with centering & scaling
xy = [ 1508.936 19.2189 1509.159 54.27226 1509.472 102.8022 1509.852 154.8707 ...

4 years ago | 0

Answered
manipulating each pixel in an image sequence
k = 3; dim = 3; filtered_sequence = movmedian(ImageSequence, k, dim); fft_of_sequence = fft(ImageSequence, [], dim); %...

4 years ago | 0

Answered
Is it posible to solve system of differential equations with piecewise function inside?
Well, let's try something very simple: syms x(t) A = piecewise(t >= 0, -t, t) dx = diff(x, t) eqn = dx == A dsolve(eqn) I ...

4 years ago | 0

Answered
Extract Value from ODE45
No, you can only interpolate the position, as there is no t value at which y(:,2) is exactly 0.1. %For plots [t,y] = ode45(@od...

4 years ago | 0

Answered
All combinations of cell arrays
A= [1 2 3 1 2 4 1 3 5]; B = [1 6 4 5]; nA = size(A,1); nB = size(B,1); [Aidx, Bidx] = meshgrid(1:nA, 1:nB);...

4 years ago | 1

| accepted

Answered
finding variables in polynomial expressions
syms s k1 k2 ke A = [0 -83.33; 500 -10]; B = [166.67; 0]; C= [0 1]; K = [k1 k2]; A2 = [A-B*K B*ke; -C 0]; a = det(s*e...

4 years ago | 1

| accepted

Answered
How to get the expression of a 3d surface
I have a 3d surface of a laser intensity distribution, how can get its mathematical expression? If what you have is a finite di...

4 years ago | 0

Answered
How can the following code be optimized / vectorized?
You can see that the rem() based expression I use here can be used to vectorize the calculation. format bank Length = 5; x = ...

4 years ago | 0

Answered
Convert csv file to .wav file with same file name
indir = '.'; %were are the csv? %current directory outdir = 'C:\Users\gagan\Downloads\testing_lab\sound files'; %where to wri...

4 years ago | 1

| accepted

Answered
How can i assign different panelties to different constraints???
Make pp1 a vector. Use a penalty of pp1(j).*g(i,j) Note: you can vectorize. No loop needed. Make pp1 a row vector with the sam...

4 years ago | 0

| accepted

Answered
Help needed for below error
x2 = [0 1.73]; row vector Eflevel1(range1) = fsolve(eq2, x2); vector is used as the example parameters for fsolve, so eq2 ...

4 years ago | 0

Answered
Matlab exits automatically before the program is finished.
MATLAB can end up quitting by itself if it runs out of memory.

4 years ago | 0

Answered
Is there any way to get the uigetfile panel to be centered in the monitor when it first comes up????
No, there is no control over that. If you are not using a deployed app, then MATLAB runs a java method to start an operating-s...

4 years ago | 0

Answered
Why not get the exact value of this matlab code?
Why does it not get the exact value? Perhaps because you did not enter exact coefficients. What is the exact value of 7.8285 ? ...

4 years ago | 0

Answered
Exclude some lines from script help
You cannot do that, except by supplying your own help function (that would interfere with regular use of the help function.)

4 years ago | 1

Answered
Unable to find symbolic solution warning
dsolve() is returning [] because it cannot find solutions. When it returns [], that is something that cannot be created as a fun...

4 years ago | 1

Answered
Matlab GUI not recognizing variables
Make sure you are consistent about how you use x and y . MATLAB prefers y as the row number, because rows are vertical and y is ...

4 years ago | 0

Answered
BPM analysis in a song
partial correction. [queen,fs] = audioread('Test_sound.mp3'); if size(queen,1) > fs*30 vyrez = queen(1:fs*30,1); % setti...

4 years ago | 0

Answered
Can i know how to gwt image in UIAXES? My uiaxes is back so when i run n load image the input didnt display.
You currently have aaa=uigetfile('*.jpg'); That can only return the file name and not the directory. You need to use the two-o...

4 years ago | 0

Answered
How can I simplify into the line?
bwmorph('skel')

4 years ago | 1

| accepted

Load more