Risposto
Switching between two integrators, spacecsaft dynamics
I highly discoruage you to switch between dynamical systems because you are making your life much harder for no reason. First, ...

oltre un anno fa | 0

Risposto
Creating a rectangular patch using random numbers
You can't really fix this. A plane is univoquely defined by 3 points in space, so, most-probably, a fourth point won't lie on t...

oltre un anno fa | 1

Risposto
How to find how many values in one column in csv file?
Once you upload the data from you .csv you can find start and end indeces by doing: data = randi(2,1e3,1) - 1; startIdx = strf...

oltre un anno fa | 0

Risposto
Polarplot - plot arc between points instead of line
point1 = [3, 4]; point2 = [10, 0]; radius = 6; dir = 'Up'; nPoints = 50; [x, y, c] = getArc(point1, point2, radius, dir, ...

oltre un anno fa | 0

Risposto
I am using surf command inside time loop. And I want my initial reference surface.
To plot multiple object you want to use: hold on; If you ant to iterate different plot but only retain the first one, the me...

oltre un anno fa | 0

Risposto
How to define color axis in a for loop?
By axis color, do you mean something like this? nPoints = 10; [X,Y] = meshgrid(-3:6/nPoints:3,-3:6/nPoints:3); Z = peaks(X,Y)...

oltre un anno fa | 0

| accettato

Risposto
Trying to simultaneously solve the following, but I'm getting the following error, can someone please tell me how to fix it?
Try this syntax: syms F G eqn = [2 * F^2 * G^2 + 3 * G == 13.8 , 2 * G^3 + F^2 == 16.6]; sol = solve(eqn, [F G]) If you re...

oltre un anno fa | 0

Risposto
How can I graph a cylindrical magnetic dipole?
With quiver or quiver3 [Ref].

oltre un anno fa | 0

Risposto
Convert Matlab Cell-Array with subtables into a python variable type
I do not know specifically how to pass data from Matlab to Python, but my way of doing it would be to store the cell in Excell s...

oltre un anno fa | 0

Risposto
"Maximum recursion limit of 500 reached." when loading model in Simulink
set(0,'RecursionLimit',1000);

oltre un anno fa | 0

| accettato

Risposto
How do you get a function to return true or false to the script where the function was called?
the file play_blackjack.m is not a script, but a function. In blackjack.m change the line: play_blackjack To: game = play_bl...

oltre un anno fa | 1

Risposto
Why does the heatmap chart color some numeric values differently?
>> h = heatmap(tbl,'Smoker','SelfAssessedHealthStatus','CellLabelColor','Black'); % ...

oltre un anno fa | 0

| accettato

Risposto
How to shade with upper and lower limits along a curve line? (see example in image below)
N = 100; x = linspace(0,2*pi,N); y = 1 + cos(x); yNoiseUp = y + 0.5 + .25*(sin(x) + .25*(rand(1,N) - 0.5)); yNoiseDown = y -...

oltre un anno fa | 0

Risposto
How to create string of text-objects
You can't concatenate doubles and string in one array, because the array can be only one of them. If you want to only store the...

oltre un anno fa | 1

Risposto
Chain array indexing error to access elements of a function
The fact that you can't concatenate indexing is a well-known Matlab limitation whose implementation has already been suggested o...

oltre un anno fa | 0

Risolto


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

oltre un anno fa

Risolto


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

oltre un anno fa

Risposto
How can I make my lamp indicator color turn green once it reaches a certain number with the app.label.Text
uilabel dont allow much interactivity. I guess you have some familiarity with Callbacks, so I suggest you to use uieditfield an...

oltre un anno fa | 0

Risposto
Combine Plot and Scatter in Legend
x = 1:10; y1 = randi(10,1,10); y2 = randi(10,1,10); y3 = randi(10,1,10); figure; hold on; grid on; plot(x,y1,':d',... ...

oltre un anno fa | 0

| accettato

Risposto
Graphical output of subscripts in one main script
Your code is fine but you need to delete the first line: clc, clear, close all I did it and saved your script naming it fig_4....

oltre un anno fa | 0

Risolto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

oltre un anno fa

Risposto
Looping for cell arrays
Add a second loop for the rows: for row = 1 : size(down_files,1) for col = 1 : size(down_files,2) fileread(down_f...

oltre un anno fa | 1

Risposto
Help with matlab script
1) Correct me if I am wrong, but with "I'm not seeing the values appear in the workspace", I think you are saying you only see t...

oltre un anno fa | 0

| accettato

Risposto
I am getting the following error: Error using atan2 Inputs must be real. Error in (line 27) phi_vet = 2*atan2(-k_1-sqrt(k_1.^2+k_2.^2-k_3.2),k_3-k_2);
The term inside the square roort has some negative values, thus producing imaginary numbers. sqrt(k_1.^2+k_2.^2-k_3.^2) I am...

oltre un anno fa | 0

| accettato

Risposto
Hyperbolic Fitting using multiple data sets from each experiment.
Please try to use the forum next time, as your answer was just a simple search away. data = readmatrix('Model.xlsx'); x = da...

oltre un anno fa | 0

Risposto
Finding correct MinPeakDistance using for loop
Your idea of increasing 'MinPeakDistance' to adjust the peaks found is not consistent. For example, if you iterate manually, yo...

oltre un anno fa | 0

Risposto
fill and replicate numbers in the matrix
You can re-adapt your data to exploit this very nice method to divide stimuli into a cell array. Then is just a metter of manip...

oltre un anno fa | 0

| accettato

Risposto
EEG frequence and noise estemation
Look at fft documentation: x=load('5.txt'); y = fft(x); PS = abs(y).^2; N = length(x); fs = 500; % From documentatio...

oltre un anno fa | 0

Risposto
how is it possible to correspond negative coordinates to matrix indices?
You can normalise the coordiante to transorm them into indeces: x = -9.5 : 9.5; % -9.5 -8.5 ... 8.5 9.5 xIdx = x - x...

oltre un anno fa | 0

Risposto
Make a Truth Table
From the graph I see that the peaks marked are, as you say, over the half, but of the limits of the y axis, not of the maximum v...

oltre un anno fa | 0

Carica altro