Answered

how to plot an angle quadrant?

What about something like this theta = [290 294 200 175 95 45 30 276 320]; polarplot(theta*pi/180, ones(size(theta)), '.', '...

how to plot an angle quadrant?

What about something like this theta = [290 294 200 175 95 45 30 276 320]; polarplot(theta*pi/180, ones(size(theta)), '.', '...

33 minutos ago | 0

Answered

How to add a second , upper x axis and control the value's locations and text?

Are you trying to do something like this x = 1:10; y = x.^2; % ax1 = axes(); box(ax1); xlabel('vector 1') ylabel('vector ...

How to add a second , upper x axis and control the value's locations and text?

Are you trying to do something like this x = 1:10; y = x.^2; % ax1 = axes(); box(ax1); xlabel('vector 1') ylabel('vector ...

alrededor de 1 hora ago | 0

Answered

storing unknown matrices size in a single matrix

If you already have created variable names like that, then you need to concatenate them like this manually matrix = [math_class...

storing unknown matrices size in a single matrix

If you already have created variable names like that, then you need to concatenate them like this manually matrix = [math_class...

alrededor de 1 hora ago | 0

Answered

how to draw a tangent to a data points at a given x-coordinates in matlab

Unless you have an equation describing these data points, you can only estimate the slope of tangent (derivative) using gradient...

how to draw a tangent to a data points at a given x-coordinates in matlab

Unless you have an equation describing these data points, you can only estimate the slope of tangent (derivative) using gradient...

alrededor de 3 horas ago | 0

Answered

using imported txt file in neural network

Use writematrix() x=[120 240 480 960 1920]; writematrix(x, 'filename.txt', 'Delimiter', ' '); In older versions dlmwrite('...

using imported txt file in neural network

Use writematrix() x=[120 240 480 960 1920]; writematrix(x, 'filename.txt', 'Delimiter', ' '); In older versions dlmwrite('...

alrededor de 3 horas ago | 0

Answered

How to resize array using a mask

a = [1 , 2 , 3 ; 4 , 5 , 6 ; 7 , 8 , 9]; b = [ 1; 0; 1]; c = a(b==1, :);

How to resize array using a mask

a = [1 , 2 , 3 ; 4 , 5 , 6 ; 7 , 8 , 9]; b = [ 1; 0; 1]; c = a(b==1, :);

alrededor de 5 horas ago | 0

Answered

How do I minimize one output and constrain the value of another?

Yes, it is possible. However, it might be better of you divide it into two different functions to avoid redundant calculations. ...

How do I minimize one output and constrain the value of another?

Yes, it is possible. However, it might be better of you divide it into two different functions to avoid redundant calculations. ...

alrededor de 5 horas ago | 0

Answered

How to set bounds for coefficents when curve fitting

See lsqcurvefit(): https://www.mathworks.com/help/releases/R2020a/optim/ug/lsqcurvefit.html. You can specify lb and ub parameter...

How to set bounds for coefficents when curve fitting

See lsqcurvefit(): https://www.mathworks.com/help/releases/R2020a/optim/ug/lsqcurvefit.html. You can specify lb and ub parameter...

alrededor de 5 horas ago | 0

Answered

Find where two cell arrays of different sizes are equal

To compare char arrays, strcmp() should be used. However, since you are using the lastest version of MATLAB, so there are easier...

Find where two cell arrays of different sizes are equal

To compare char arrays, strcmp() should be used. However, since you are using the lastest version of MATLAB, so there are easier...

alrededor de 5 horas ago | 1

| accepted

Answered

Shade the region to the left of the graph

Simplest way is to use patch(). Something like this %Stall Speed rho = 0.002378; % at sea level Clmax = 2.7; Vs = 189.056; ...

Shade the region to the left of the graph

Simplest way is to use patch(). Something like this %Stall Speed rho = 0.002378; % at sea level Clmax = 2.7; Vs = 189.056; ...

alrededor de 16 horas ago | 0

Answered

How to plot multiple graph

You are using the symbolic variables incorrectly. Check this code % clc; clear all; close all; syms x f(x)=sin(5*x)./(x.^3); ...

How to plot multiple graph

You are using the symbolic variables incorrectly. Check this code % clc; clear all; close all; syms x f(x)=sin(5*x)./(x.^3); ...

alrededor de 17 horas ago | 0

Answered

Reading single value from text file

Try this str = fileread('data.txt'); peak_freq = regexp(str, 'Peak frequency \(Hz\) =[\s\t]*(\d*\.\d*)', 'tokens'); peak_fr...

Reading single value from text file

Try this str = fileread('data.txt'); peak_freq = regexp(str, 'Peak frequency \(Hz\) =[\s\t]*(\d*\.\d*)', 'tokens'); peak_fr...

alrededor de 17 horas ago | 1

| accepted

Answered

vectorise for loop with element wise multiplication

Loops are not always necessarily slow. However, the vectorized code is much more cleaner and readable. For the simple example, y...

vectorise for loop with element wise multiplication

Loops are not always necessarily slow. However, the vectorized code is much more cleaner and readable. For the simple example, y...

alrededor de 17 horas ago | 1

Answered

Matlab Newbie here / I want to multiselect files but it always gives me an error

When MultiSelect is on, then uigetfile() returns a cell array. So you need to specify which file to open in fopen like this fid...

Matlab Newbie here / I want to multiselect files but it always gives me an error

When MultiSelect is on, then uigetfile() returns a cell array. So you need to specify which file to open in fopen like this fid...

alrededor de 17 horas ago | 1

Answered

How to convert my data from hourly to daily (no timestamp )

See retime(): https://www.mathworks.com/help/matlab/ref/timetable.retime.html But If you just want daily average, then you can...

How to convert my data from hourly to daily (no timestamp )

See retime(): https://www.mathworks.com/help/matlab/ref/timetable.retime.html But If you just want daily average, then you can...

alrededor de 17 horas ago | 0

Answered

How to get rid of values from meshgrid

Try this syms u uo ur v x y Q C r T tt V=100;b=2;uo=-V*sin(Q);ur=V*2*pi*b/(2.*pi.*r)+V*cos(Q);r=(x.^2+y.^2).^0.5;Q=atan2(y,x)...

How to get rid of values from meshgrid

Try this syms u uo ur v x y Q C r T tt V=100;b=2;uo=-V*sin(Q);ur=V*2*pi*b/(2.*pi.*r)+V*cos(Q);r=(x.^2+y.^2).^0.5;Q=atan2(y,x)...

alrededor de 17 horas ago | 0

| accepted

Answered

A loop to extract and plot data from a table

I think you meant x = 0:1:9 (10 rows). You can do something like this t % 10x11 table M = table2array(t); 10x11 matrix plot(...

A loop to extract and plot data from a table

I think you meant x = 0:1:9 (10 rows). You can do something like this t % 10x11 table M = table2array(t); 10x11 matrix plot(...

alrededor de 18 horas ago | 0

Answered

How to compute integral when one of the limits is a vector

If you want to use all the points in x as the limits one after the other, then following is the way to do that FunctionToEvalua...

How to compute integral when one of the limits is a vector

If you want to use all the points in x as the limits one after the other, then following is the way to do that FunctionToEvalua...

alrededor de 19 horas ago | 1

| accepted

Answered

Browse CSV file and calculate the mean

1) Read the csv file using: readmatrix(): https://www.mathworks.com/help/matlab/ref/readmatrix.html, or readtable(): https://www...

Browse CSV file and calculate the mean

1) Read the csv file using: readmatrix(): https://www.mathworks.com/help/matlab/ref/readmatrix.html, or readtable(): https://www...

alrededor de 19 horas ago | 0

Answered

Make UIAxes Background invisible or hide it in APP Designer

It seems that the background color of a UIAxes cannot be set to 'none'. See the attached app for an alternative. It set the back...

Make UIAxes Background invisible or hide it in APP Designer

It seems that the background color of a UIAxes cannot be set to 'none'. See the attached app for an alternative. It set the back...

alrededor de 20 horas ago | 0

| accepted

Answered

The function plotxy() is not recognized

You need simscape toolbox to use this function: https://www.mathworks.com/help/physmod/simscape/index.html. Also, you need to ca...

The function plotxy() is not recognized

You need simscape toolbox to use this function: https://www.mathworks.com/help/physmod/simscape/index.html. Also, you need to ca...

alrededor de 20 horas ago | 0

| accepted

Answered

fitting complex to custom complex equation

There are several ways to fit the given data to a custom model in MATLAB. If you have the curve fitting toolbox, then you can us...

fitting complex to custom complex equation

There are several ways to fit the given data to a custom model in MATLAB. If you have the curve fitting toolbox, then you can us...

alrededor de 21 horas ago | 0

Answered

How can i compute an interpolated curve?

Check this code % generating curves x = linspace(1, 2, 100); y1 = x.^3 + 2 + rand(size(x))*0.1; % let t=10 for this curve y2...

How can i compute an interpolated curve?

Check this code % generating curves x = linspace(1, 2, 100); y1 = x.^3 + 2 + rand(size(x))*0.1; % let t=10 for this curve y2...

alrededor de 21 horas ago | 0

Answered

How to swap cells in matrix with code

Check this D = [8 1 6;3 5 7;4 9 2]; idx = find(D > 5); D(idx) = 0; Result >> D D = 0 1 0 3 5 0...

How to swap cells in matrix with code

Check this D = [8 1 6;3 5 7;4 9 2]; idx = find(D > 5); D(idx) = 0; Result >> D D = 0 1 0 3 5 0...

alrededor de 21 horas ago | 0

| accepted

Answered

datastore won't read variable names

Use PreserveVariableNames options ds = datastore('filename', 'PreserveVariableNames', true)

datastore won't read variable names

Use PreserveVariableNames options ds = datastore('filename', 'PreserveVariableNames', true)

alrededor de 21 horas ago | 0

Answered

How accurately Simscape Multibody calculates volume of a complex custom cad file solid?

It appears that MATLAB documentation does not give details about the process of calculating these values from geometry. However,...

How accurately Simscape Multibody calculates volume of a complex custom cad file solid?

It appears that MATLAB documentation does not give details about the process of calculating these values from geometry. However,...

alrededor de 23 horas ago | 0

Answered

hi , i'm trying to make a simple loop which is give me a useless syntax between what i need , please how can i remove ('ans=') thanks anyway

Use fprintf() for k=1:20 fprintf('<div> DIV %d </div>\n',k) end

hi , i'm trying to make a simple loop which is give me a useless syntax between what i need , please how can i remove ('ans=') thanks anyway

Use fprintf() for k=1:20 fprintf('<div> DIV %d </div>\n',k) end

alrededor de 23 horas ago | 0

Answered

What is the problem in this following program? Why my function isn't working?

Define it like this function [area] = tri_area(b,h) area = (0.5)*(b)*(h); end Read about MATLAB functions here: https://www....

What is the problem in this following program? Why my function isn't working?

Define it like this function [area] = tri_area(b,h) area = (0.5)*(b)*(h); end Read about MATLAB functions here: https://www....

1 día ago | 1

| accepted

Answered

draw a boxplot from percentiles

Something like this data = [702.454 1761.20017 1863.878989 2058.24099 5206.202; 662.9978 854.7328411 921.9074214 1079....

draw a boxplot from percentiles

Something like this data = [702.454 1761.20017 1863.878989 2058.24099 5206.202; 662.9978 854.7328411 921.9074214 1079....

1 día ago | 1

| accepted

Answered

Symbolic parameters not supported in nonpolynomial equations

This simply means that the equations are too complicated to be solved symbolically. Robot kinematic equations rarely have a clos...

Symbolic parameters not supported in nonpolynomial equations

This simply means that the equations are too complicated to be solved symbolically. Robot kinematic equations rarely have a clos...

1 día ago | 0