Réponse apportée
Display temperature reading of MAAX6675 on Matlab GUI via Arduino board
You will have to use the SPI interface of the Arduino support package to configure access to MAX6675: https://www.mathworks.com...

plus de 3 ans il y a | 0

Réponse apportée
How to integrate filter function into matlab code
You can create the Butterworth filter directly and use it in your code without needing to store anything: Fs = 2000; % Sampling...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Find which side of a line is my point
You can use the sign of the z-term of the cross product of the vectors defining the line and the points of interest: vAB = [3 2...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Creating a Decay line graph that repeats with last answer
Perhaps something like this, where the current value of "y" is dependent on its previous value: power = 2.0; decay = 0.16; ...

plus de 3 ans il y a | 0

Réponse apportée
How do you vertically concatenate two tables with different variables of different data types
C1 = {"ford" 50 0.002439379}; T1 = cell2table(C1, "VariableNames", ["string1" "double1" "double2"]); C2 = {... "mazda" "Sub...

plus de 3 ans il y a | 0

Réponse apportée
A "plot" progression of points following a round course
You can use a (cubic) spline for interpolation. beta=[0 0.2 0.4 0.6 0.8 1 1.2]; randr=[0 84.25 89.97 91.38 91.60 91.32 90.81];...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to find two values in a 3D table?
N-dimensional interpolation should probably work. For more details, see interpn. X = [1 2 3 4 5 6]'; Y = [10 20 30 40 50 60]';...

plus de 3 ans il y a | 1

Réponse apportée
Maintain values inside loop
Store the results in a vector of results instead of just keeping a scalar result for the last one. See the "{i}" index below: f...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to call funcitons inside a loop ? To automate my testing
The variable called "obj" in your function is not defined anywhere in your code. You either need to pass it into the function as...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Correlation with two matrices
You can compute the pairwise correlation between columns of matrices as follows: % Data matrics with 64 channels (columns) A =...

plus de 3 ans il y a | 0

A résolu


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

plus de 3 ans il y a

A résolu


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

plus de 3 ans il y a

A résolu


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

plus de 3 ans il y a

Réponse apportée
Linear Least Squares Regression
% Original data x = [2, -2, 3, -3]; y = [7, 8, 19, 17]; % Take tranposes. x = x'; y = y'; % Find coefficients of a qu...

plus de 3 ans il y a | 1

Réponse apportée
Finding a variable in a large table
% Create a table T = table; T.Name = ["London"; "Paris"]; T.Data1 = {15; 20}; T.Data2 = {-1; 2}; T % Find index of Name ...

plus de 3 ans il y a | 0

Réponse apportée
I want to rotate the rotated image in the forward direction. How do I do this?
Select upper point and then lower point using the code below: line([0.1 0.2], [0.1 0.2]) % Should give a 45 degree line [x y] ...

plus de 3 ans il y a | 1

Réponse apportée
number of figure windows that are currently open?
f1 = figure; f2 = figure; F = findobj('Type', 'figure') n = numel(F)

plus de 3 ans il y a | 3

| A accepté

Réponse apportée
Why do I receive error "Index in position 2 exceeds array bounds"
Print out what app.hr is. It is likely a string and not a numerical value since you are reading it from the drop down widget. If...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
error in pca code
You have to use the imread function to read the content of the image into a matrix. See imread. So instead of X = actin2.tif ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Matlab doesn run the program , says at the editor 'input argument might be unused ' for t
You have to save your odefun function into a MATLAB file with the name odefun.m. The message "input argument might be unused ' ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Transformig digital transferfct in analog transferfct
Take a look at the d2c function: D2C. % Discrete transfer function H = tf([1 -1],[1 1 0.3],0.1) % Convert to continuous tra...

plus de 3 ans il y a | 0

Réponse apportée
matrix per minute in plot per hour
Something like this? for k = 0:20 x = minutes(15*k + linspace(0,15,96)); y = cumsum(rand(96,1)); p = plot(x,y); ...

plus de 3 ans il y a | 0

Réponse apportée
Help with non linear equations.
fsolve actually finds a correct solution: x = fsolve(@(x) fcn(x),[1;1;1]) You can see that the solution satisfies the equation...

plus de 3 ans il y a | 1

Réponse apportée
Unable to perform assignment because the left and right sides have a different number of elements.
On this line JxL(j) = C.*A.*real(SxL); you are trying to assign a vector (C.*A.*...) into a scalar element of the variable JxL...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to creat noisy copies of vector?
x = -4:0.1:10; v1 = 0.1; r1 = sqrt(v1).*randn(size(x)); Y1 = x + r1; var(r1) % Should be approximately 0.1 v2 = 1; r2 ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
I deleted part of the trapz function code, how do I fix it?
Did Undo not work (Ctrl + Z)? This might help you restore it. What version of MATLAB are you using? function z = trapz(x,y,dim...

plus de 3 ans il y a | 1

Réponse apportée
Discrete transfer function implementation on hardware explodes to infinity
Your discrete transfer function has poles (almost) right on the unit circle: sys = tf([0 0.0611], [1 2.05 0]); sysd = c2d(sys,...

plus de 3 ans il y a | 0

Réponse apportée
'Matlab says that the problem is at (t), i want to use ode45
As long as you call your function the right way, it should work: ode45(@odefun, [0 10], [1 1 1]) function dxdt = odefun (t...

plus de 3 ans il y a | 1

Réponse apportée
High pass filter lower amplitude of the filtered signal
Try instead a filter that is more smooth at the transition region and has less ripple at the left of the high-pass region: fs =...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Alternate Text for image in Live Script
You can now add Alt-text to images in the Live Editor using the "Edit Image.." right-click menu on the inserted image. You will ...

plus de 3 ans il y a | 0

Charger plus