Answered
Plotting an ODE with an event detection function
y0 = [x y Px Py]; [x, y] = ode45(@ODEdbb,tspan,y0,option); The first output from ode45() is the time values. The second outp...

4 years ago | 0

Answered
Extracting xyzpoints from Point Cloud
Location: [14816040×3 single] That tells you that the position information is 14816040 x 3 . It is not a 3D array. Pointc...

4 years ago | 0

Answered
Eigenvectors not changing with constant parameter
eigenvectors are geometrically directions. When you scale a matrix by a nonzero constant, the direction does not change.

4 years ago | 0

Answered
I am trying to paste code in the Matlab Editor but the underscores are missing and there are spaces between the characters, how can I fix this?
pdf files do not generally contain text strings. pdf contain commands in a programming language, with the commands *drawing* the...

4 years ago | 1

Answered
Multiple outputs of a single function in a single array
In each case where you assign to f, change the code to assign to f(r+1)

4 years ago | 1

| accepted

Answered
Error using MATLAB fsolve function and not sure why.
x(1)*r3(x(4)-x(3) That code tries to index r3 at location x(4)-x(3) Remember, MATLAB has absolutely no implied multiplication...

4 years ago | 0

Answered
Two computers share one license.
What you propose is not permitted with a Student license or a Home license. It is permitted with an Academic license or a "Stan...

4 years ago | 0

Answered
Force imaginary part of complex answer to be postive (efficiently)
format long g S = 10000; result = complex(randn(S,1), randn(S,1)); N = 100; t1 = zeros(N,1); t2 = zeros(N,1); t3 = zeros(N...

4 years ago | 0

| accepted

Answered
Import simulink block model to workspace
Simulink variables are not available to MATLAB until the model is paused or stopped. You can control the stop time using the si...

4 years ago | 0

Answered
3D Point Cloud to Raster Image
I=find(TransformPCA(:,1)>minX & TransformPCA(:,1)< ... minX+resolution_pix & TransformPCA(:,2)>minY & ... ...

4 years ago | 0

| accepted

Answered
Solve nonlinear equations with condition
syms a1 a2 eqns = [1-2*cos(5*a1)+2*cos(5*a2) == 0, 1-2*cos(a1)+2*cos(a2) == pi/5]; sol = vpasolve(eqns, [a1 a2], ones(2,1)...

4 years ago | 0

| accepted

Answered
solving the differential equation
Your system cannot work. dQ/dt=A * Irr * Tp + B * Te * Tp You say that Irr and Te are matrices with one row and 18 columns. If...

4 years ago | 0

Answered
Convert Boolean to integer
Use an if block; https://www.mathworks.com/help/simulink/slref/if.html Make the temperature an input to the block to be trigge...

4 years ago | 0

| accepted

Answered
can i add g and h like normal addition
There is no problem adding those? x0=ones(1,96).*[0]; lb_5=ones(1,96).*[-2700]; ub_5=ones(1,96).*[3000]; A=[]; b=[]; Aeq=[...

4 years ago | 1

Answered
There is a way to stretch (scale) for a scaling factor a curve and save the stretched indexes and corresponding values ?
If what you have currently is a list of x coordinates and a list of y coordinates, and you want the same density, then it would ...

4 years ago | 0

Answered
What does this line mean mouse.mouseMove(1600-(a(1).Centroid(1,1)*(5/2)),(a(1).Centroid(1,2)*(5/2)-180));
According to https://stackoverflow.com/questions/38058911/why-are-x-and-y-coordinates-located-in-the-top-left-corner-instead-of-...

4 years ago | 1

Answered
Error on plotting (Index in position 1 exceeds array bounds. Index must not exceed 51.)
You use [X,Y] = meshgrid(1:1:n+1, 1:1:m+1) . When you do that, the values in X are 1 through n+1 and the values in Y are 1 throu...

4 years ago | 1

Answered
After running, the MysPow is displaying as NaN, any ideas as to why?
KWatts = [100 500 900]; Ohms100 = [1.1900, 1.1845, 1.1776, 1.1746, 1.1797, 1.1925]; Ohms100Avg = median(Ohms100); Ohms5...

4 years ago | 0

Answered
Local Thresholding in blocks error
filename = 'football.jpg'; S = 3; my_function(filename, S); function []=my_function(filename,S) IM=imread(filename); ...

4 years ago | 0

Answered
Hello I have been trying to figure out how to solve the 5 equations with 5 unknowns using Syms and Solve.. But i have not been able to obtain the correct values.
eq1 you use cosd(b) and cosd(d) but everywhere else you are using cos().

4 years ago | 0

| accepted

Answered
Could be changed Atan library in simulink to C souce code in Matlab?
https://www.mathworks.com/help/matlab/ref/atan.html#refsect-extended-capabilities atan() is supported for source code generati...

4 years ago | 0

Answered
Trying to understand the single-sided FFT
For a single-sided FFT, is it correct to multiply the FFT by 2, if so why? No, it is not. When you use the analytic fourier t...

4 years ago | 0

Answered
Arrays have incompatible sizes for this operation.
format long % Given Values T = 429.65; % K - Given Temperture P = 99.6 ; % kPa - Pressure % Specific Diameters given Dp...

4 years ago | 0

| accepted

Answered
Problems with y==x: Division Isolation
syms x y yOverx eqn = y == x eqn2 = subs(eqn, y, yOverx * x) isolate(eqn2, yOverx)

4 years ago | 0

| accepted

Answered
How to access the variables in the for loop?
It is not clear to me why you cannot plot e inside the loop? Create an animatedline() object before the loop. Inside the loop...

4 years ago | 0

Answered
cftool when selecting data
Fs = 4*1000; %Hz -- put in real data t = (0 : length(x) - 1) / Fs; cftool(t, x)

4 years ago | 1

| accepted

Answered
How to get cursor info in UIaxes
event_obj.Target will be the handle to the graphics object. You can use ancestor(event_obj.Target, 'axes') if you need the UIAxe...

4 years ago | 0

Answered
How do you open MATLAB Runtime on Mac?
When you say "MATLAB Runtime" do you mean MCR, MATLAB Component Runtime? If so then that is not intended as a stand-alone applic...

4 years ago | 0

Answered
How can I create a function with several summations and Kronecker delta symbol in two dimension?
Your expressions involve delta subscript something that is a multiplication, rather than delta subscript something, all multipli...

4 years ago | 1

Answered
How to pick maximum value in group?
findgroups(a). Then splitapply(@max)

4 years ago | 0

Load more