Risposto
How to substitute to a variable in a function with a constant
% Specify the values beforehand t = 0:.1:5; c = 2; x = 3.0 + 4.0.*t + c.*t.^2 - 2.0.*t.^3; plot(t, x) % symbolic computati...

quasi 2 anni fa | 0

Risposto
Is the z-axis in a Sphere only positive?
No. It consists of both positive and negative parts. [X, Y, Z] = sphere(100); Points = [X(:), Y(:), Z(:)].'; %plot3(Points(1...

quasi 2 anni fa | 0

| accettato

Risposto
Is there a way to read 16bit float(mantissa 8bit)bin file?
str = "00 00 07 00 F8 FF FD FF 01 00 01 00 01 00 FF FF" a = sscanf(str, "%s%s", inf); n = floor(length(a)/4) afi = fi(0, 1, 1...

quasi 2 anni fa | 0

Risposto
split array into subarrays according to the labels
load(websave("L.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1116785/L.mat")) whos ul = unique(L)'; ...

quasi 2 anni fa | 0

Risposto
How to plot a ScatterPlot with different colours for each column?
A=rand(2,40); B=rand(2,40); %scatter(A,B,'filled') scatter(A', B', 'filled') % use coloumn oriented data

quasi 2 anni fa | 0

Risposto
How to make a plot with specific scale (Max, Min, and difference)
x = 0:90; y = rand(size(x)); plot(x, y); grid on yticks(0:.2:1) % Change the yticks interval

quasi 2 anni fa | 0

| accettato

Risposto
find nearest value on mesh grid under certain contour
load(websave("matlab.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1116160/matlab.mat")) % whos surf(X...

quasi 2 anni fa | 0

Risposto
Variable lim3 must be of data type sym. It is currently of type double. Check where the variable is assigned a value.
%Solve for lim3 syms x %x = 4; lim3 = (3*(x-4)*sqrt(x+5))/(3-sqrt(x+5))

quasi 2 anni fa | 0

| accettato

Risposto
Getting errors while using fplot
syms v(t) s(t) g = 9.8; EQv = diff(v) == -g; cond = v(0) == 105; v(t) = dsolve(EQv, cond) EQs = diff(s) == v(t); cond = ...

quasi 2 anni fa | 0

| accettato

Risposto
I want to plot (filter) the highest value among both y1, y2.
% Generate some data x1 = sort(rand(50, 1)); y1 = randn(size(x1)) + 0.4; x2 = sort(rand(50, 1)); y2 = randn(size(x2)) + 0....

quasi 2 anni fa | 0

| accettato

Risposto
surf plot from data sets connected to each other
load(websave("data.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1115735/data.mat")) head(data) data1=...

quasi 2 anni fa | 0

| accettato

Risposto
I get this error bellow >> how can i fix it ?
getDesiredStateFromTrajectory([1 2 3 4], 123) % call the function by passing the values % Use this as a local function or sa...

quasi 2 anni fa | 0

| accettato

Risposto
histogram for gaussian distribution.
% N = input("value : ") N = 2000; data = randn(N, 1); % randn(N) => NxN a = 1;% standard deviation b = 0; % mean out = ...

quasi 2 anni fa | 0

Risposto
increase factorial execution speed
n = 5 % n max is 20 out = cumprod(1:n) n = fi(5); % n max is 20 out = (1:n); for i = 2:n out(i) = out(i-1)*i; e...

quasi 2 anni fa | 0

| accettato

Risposto
Check every two second if a EXE is running and do stuff
Here is a skeleton you can based on: % user a timer function t = timer; t.Period = 2; t.TimerFcn = @check_exe; start(t) ...

quasi 2 anni fa | 0

| accettato

Risposto
Why can't I use CustomFloat??
You need the Fixed-Point Designer toolbox, which is a separate product you may not have in your system. In the web, the toolb...

quasi 2 anni fa | 1

Risposto
Place value on globe at specific lat/lon
Is this what you mean for placing value worldmap worl load coastlines plotm(coastlat, coastlon) textm(45, 30, '123', 'Color'...

quasi 2 anni fa | 0

| accettato

Risposto
To extract the last sub string from strings
load(websave("input.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1114425/input.mat")) input s = regex...

quasi 2 anni fa | 0

Risposto
Need Help Plotting y=1-e^{-5x}
syms x y y = 1-(exp(-5*x)); fplot(y, [-.2 3]) % need right interval for x (or set ylim([-2 1]) grid on

quasi 2 anni fa | 0

| accettato

Risposto
Compute equations with given variables and matrices
𝑥𝑦^4/𝑥^2 : x*y^4/x^2 𝑥𝑦^3 − 𝑥^2/𝑥^3 −1: similar to above 𝑚 × 𝑧: m*z sin(𝑚): You guess? 𝑚 × 𝑛 (𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡𝑤𝑖𝑠𝑒 𝑜𝑟 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑏...

quasi 2 anni fa | 0

Risposto
why i cant get the second figure ? how can i fix it
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1114385/image.bmp'); I = double(I); figure;imshow...

quasi 2 anni fa | 1

| accettato

Risposto
Updating parameter, plus plot, with slider input "in real time"
See the doc: https://www.mathworks.com/help/control/ug/build-app-with-interactive-plot-updates.html

quasi 2 anni fa | 0

Risposto
Unclear array operation in matlab
conn= [1 5 6; 2 5 7; 3 4 5 ; 4 5 7; 5 6 8] lm = [4 ,3]; % The following use lm as "linear" index to reference to conn % The...

quasi 2 anni fa | 1

Risposto
using a while loop, divide the number 256 by 7 until the value remaining is less than one
using a while loop, divide the number 256 by 7 until the value remaining is less than one assign the final value to output var...

quasi 2 anni fa | 1

| accettato

Risposto
I need help doing this short program
Use duration function % String T1str = "02:30:31"; T2str = "08:06:45"; TMstr = "12:00:00"; % Convert to duration T1 = dura...

quasi 2 anni fa | 0

Risposto
How do I plot blue asterisks on the x and y intercepts of a linear function on a 2D graph?
% getting the function from the user. % ystr = input("Introduce a linear function a*x+b: ", "s"); ystr ="3*x -6"; y = st...

quasi 2 anni fa | 0

Risposto
Matlab read table of values
BuildingID = [100;100;100;100;100;101;101;102]; column2 = ["A";"B";"C";"D";"E";"F";"G"; ""]; t = table(BuildingID, column2, co...

quasi 2 anni fa | 0

Risposto
Transforming data table from wide to long format in a specific order
X = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1096385/Wide_DataSample.xlsx"); head(X(:, 1:8)) ...

quasi 2 anni fa | 0

Risposto
ground station to satellite lat lon line
% Coordinates of the satellite and ground station p.lat = [10 10.1]; p.lon=[40 42]; p.alt=[10000 100]; % Use geoglobe uif =...

quasi 2 anni fa | 0

Risposto
Getting dimension indexes based on element index
a = randn(2,3,4,5,6); [amin, i]=min(a(:)) [i1, i2, i3, i4, i5] = ind2sub([2,3,4,5,6], i)

quasi 2 anni fa | 0

Carica altro