Solved


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

5 years ago

Solved


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

5 years ago

Solved


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

5 years ago

Solved


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

5 years ago

Solved


Add two numbers
Add two numbers (For beginners)

5 years ago

Solved


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

5 years ago

Answered
Vectorizing nested for loop
Most of your simulation time because of the data import from other data file sources importdata() and exporting the data to exte...

5 years ago | 1

Answered
Index exceeds the number of array elements (60).
Presumably, your set start_point is 1 and you are trying to access beyond 60 data points of this variable x1rec_t1 that has only...

5 years ago | 0

| accepted

Answered
I need to convert comma ',' to dot '.'
Check out this very sweet answer given by Jan: https://www.mathworks.com/matlabcentral/answers/51399-replace-comma-by-dot

5 years ago | 2

Answered
Cannot open .m files using open dialag in editor, macos big sur, r2021a
You should check your MATLAB [Preferences] settings.

5 years ago | 0

Answered
Merge two plots into one, with the same color
One of the easy solutions to your exercise is to plot it with this way: for i=0:50 plot(wavelenght+wavelenght2,integratedvalue...

5 years ago | 0

| accepted

Answered
how can i make this function work with arrays?
Elementwise operation: ... f=fzero(@(f) 1./sqrt(f)+2*log10(k/3.7+2.51./(R*sqrt(f))),[1e-18,1]); ...

5 years ago | 0

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

5 years ago

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

5 years ago

Answered
Adding two random white gaussian noise signals
Yes, you should sum both components together. You can also cosnder using MATLAB's built in fcn to generate Gaussian white noise ...

5 years ago | 0

Answered
i have this matrix i want to apply the SVD pleas help me
Use: [U,S,V] = svd(X)

5 years ago | 0

Answered
area under a curve ?
This plot is from Simulink Scope as shown here. You'd need to get the data imported into MATLAB woskpace, select the necessary r...

5 years ago | 0

| accepted

Answered
Bitshift cannot work on negative numbers
You've overlooked to specify the integer data format type, e.g.: bitshift(-6,1, 'int8') bitshift(-6,-1, 'int8') Works ...

5 years ago | 1

| accepted

Answered
How can I send 2 images using TCP???
Here is a nice discussion and use of matlab's built-in fcns to send the image files via TCP, e.g. fread, imread, fwrite. https...

5 years ago | 0

Answered
area under a curve ?
Use trapz() that gives you the numerical integration under the curve.

5 years ago | 0

Answered
DOES ANYONE KNOW WHY NOT ALL THE DATA APPEAR IN THE GRAPH?
Because there are many "nan" points in giulia_daily and therefore, your plots have many missing points.

5 years ago | 0

Answered
optimization with one exogenous symbolic variable and three endogenous variables
If you have Optimization toolbox, then you can employ a few available tools (GA, patternsearch, Paretosearch) for your exercise....

5 years ago | 0

Answered
How to plot multiple function results depending on changed variable?
This is one of the easy ways how you can calculate and plot the results. r = 1; freq = 5e9:9e9; for ii=1:numel(freq) OUT(ii)...

5 years ago | 0

| accepted

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

5 years ago

Answered
i want to convert this fransfer function to matlap code
This looks like a discrete system's TF and thus, you should have the "sample time" ts value. Here is a nice doc that explains ho...

5 years ago | 0

Answered
limit of a function is giving another limit
Because Symbolic Math Toolbox could not solve your exercise and find an explcit solution formulation.

5 years ago | 0

Answered
There is something wrong with the font displayed in the pdf exported by Live Editor
You can check this documentation of MATHWORKS on font settings: https://www.mathworks.com/help/matlab/release-notes.html?categ...

5 years ago | 0

Answered
what's the difference between Secant , Newtons, fixed-point and bisection method
You can learn Secant method from this nice tutorial: https://www.youtube.com/watch?v=1fJbbtcrXco NR method from this discussion...

5 years ago | 0

Answered
Please Help: How can I plot the system of equations?
Here is a vectorized simulation of the exercise: [X1, X2]=meshgrid(x1(1:60), x1(61:120)); YA1 = X1-X2; YB1 = c1+d11*X1+d12*X2...

5 years ago | 0

| accepted

Answered
Please Help: How can I plot the system of equations?
These loop operations are slow and the calculations can be done without a loop. There is an err in the second loop calc: for ...

5 years ago | 0

Load more