답변 있음
a file called avehighs.dat stores for three locations
Instead of looping over months, (for i = 1:12), you can plot all the months for a given location at once, and loop over location...

대략 3년 전 | 0

| 수락됨

답변 있음
Create plot with shaded standard deviation, but ...
data = readmatrix("data.xlsx") % matrix with 3 columns % columns 2 and 3 are shorter, so i ignore NaN values avg_data = mean(...

대략 3년 전 | 2

| 수락됨

답변 있음
How to remove unrecognized function or variable error
<https://www.mathworks.com/help/matlab/matlab_prog/share-data-between-workspaces.html>

대략 3년 전 | 0

답변 있음
How I do overlay 2 Matlab fig files?
f1 = openfig('trajectory id_88092.fig'); f2 = openfig('trajectory id_90788.fig'); leg = findall(f2,'Type','legend'); leg.Au...

대략 3년 전 | 0

| 수락됨

답변 있음
Fplot command only displaying a limited range. It displays [0,1] even though the range requested is [0,30].
fplot is sending a vector t to your function, not a scalar t. This causes an error if/when it gets to the first &&, which only h...

대략 3년 전 | 1

| 수락됨

답변 있음
Bar plot of categorical data
histogram seems to work fine: data = randi([0,7],46,1); histogram(data) Maybe you have another function called histogram th...

대략 3년 전 | 0

| 수락됨

답변 있음
calculate the maximum at each point of the grid
PP_temp = [P_1_4, P_1_6, P_1_9, P_2_2, P_6, P_7, P_8, P_9, P_10]; PP_max = max(PP_temp,[],2);

대략 3년 전 | 0

| 수락됨

답변 있음
how to calculate the maximum of a probability array
PP_temp = [P_1_2, P_1_6, P_1_9, P_2_2, P_6, P_7, P_8, P_9, P_10]; PP_max = max(PP_temp,[],2);

대략 3년 전 | 0

| 수락됨

답변 있음
How to reference to a struct field with char array?
name = 'ABA'; idx = 1; TestUnits.A.(name)(idx).Values

대략 3년 전 | 1

| 수락됨

답변 있음
I was using if and Elseif statements. Everytime I input the third option the print for the second option appears.
Adjust your parentheses so that the || conditions are checked together, then the &&: if (p1 == 'P' || p1 == 'p') && (p2 == 'r' ...

대략 3년 전 | 0

답변 있음
Pass plot parameters as a vector
x = linspace(0,1,10); % I changed the domain so you can see the lines y(1,:)= exp(x); y(2,:) = log(x); y(3,:) = x.^2; colors...

대략 3년 전 | 0

답변 있음
Projectile Motion when y0 does not equal 0
clear all close all clc g= -9.81; % gravitational acceleration angle= 45 *pi/180 ; % angle in radian % v0=2; % initial sp...

대략 3년 전 | 0

답변 있음
plot x label like plot(x, y) in boxplot
data = magic(5); x=[1,2,5,10,16]; boxplot(data,x);

대략 3년 전 | 1

| 수락됨

답변 있음
Summing the values inside a while loop
scores = []; ii = 1; while ii <= 10 scores(end+1) = rand(); ii = ii+1; end scores sum(scores)

대략 3년 전 | 0

답변 있음
Why is MATLAB not making multiple plots when I specify separate figures?
figure(2) makes Figure 2 the current figure, if it exists, or creates a new figure called Figure 2 if it does not already exist...

대략 3년 전 | 0

답변 있음
Vectorising nested for loops
% unzip and load data unzip data.zip load data.mat % run the loop method, for later comparison k=0; struct_data = struct(...

대략 3년 전 | 1

| 수락됨

답변 있음
Graphing specific function over time
t = linspace(0,10,100); da = 0.5+0.425*sin(2*pi*60*t); plot(t,da)

대략 3년 전 | 1

| 수락됨

답변 있음
How to write a circuit value whit complex numbers
I = 220*cos(50*t+30)/52.4;

대략 3년 전 | 0

답변 있음
I need my code to loop while my input is binary (ones and zeros). once the user inputs any other value then the loop should stop.
while true bin = input('Input binary number: ','s'); if ~all(bin == '0' | bin == '1') break end D =...

대략 3년 전 | 0

| 수락됨

답변 있음
what am I doing wrong here? It keeps saying my value for d is incorrect
d=(-cosd(60)/6)+(exp(3.*y)+(x.*y./(z.^3)).*((z./2).^(-3/4))).^3 % ^ ^ you ...

대략 3년 전 | 0

| 수락됨

답변 있음
Plot with different shapes
A = 2*rand(10,1); B = 20*rand(10,1); C = 30*rand(10,1); grid on box on hold on x = 1:10; y = A; yyaxis left plot(x,y,'p...

대략 3년 전 | 1

| 수락됨

답변 있음
How do I extract from array with values I got from that same array?
% call peaks() to get the indices of the peak(s), based on the 2nd column of ICA: peak_indices = peaks(ICA(:,2)); % get the ...

대략 3년 전 | 0

답변 있음
Edit matrix with condition
idx = mm(:,7) <= 0.0115 & mm(:,7) > 0.01; p_n = mm(idx,1:2); v_n = mm(idx,3:4); p_b = mm(~idx,1:2); v_b = mm(~idx,3:4);

대략 3년 전 | 1

| 수락됨

답변 있음
Select X, Y coordinates randomly but only do each pair 5 times
X_vector = [3; -3; -9; -15; -21; -15; -9; -3; 3; 3; -3; -9; -15; -21; -21; -15; -9; -3; 3; 3; -3; -9; -15; -21; -15; -9; ...

대략 3년 전 | 0

| 수락됨

답변 있음
Error using evalin Undefined function or variable 'var'.
This line evalin('base',"Port=var;"); evaluates "Port=var;" in the base workspace. Apparently you don't have a variable called...

대략 3년 전 | 1

답변 있음
plot based on a value
% random vectors (10x1) of values between 0 and 2 AA = 2*rand(10,1); BB = 2*rand(10,1); CC = 2*rand(10,1); DD = 2*rand(10,1)...

대략 3년 전 | 1

| 수락됨

답변 있음
I need to combine those three martix into a single big one. How do I do that?
See blkdiag: https://www.mathworks.com/help/matlab/ref/blkdiag.html

대략 3년 전 | 0

| 수락됨

답변 있음
How to sum values from a cycle
After the loop: ang_sum = sum(ang);

대략 3년 전 | 0

답변 있음
Trying to plot 20 points on top of an image for a curve. After solution in class was posted, when running it I get "Conversion to double from cell is not possible." Why?
Change the function mybezier to return a double rather than a cell array, i.e., remove the {} filename = "peppers.png" [y,z] =...

대략 3년 전 | 0

| 수락됨

답변 있음
How to set default axes tick using groot?
set(groot,'DefaultAxesXMinorTick','on','DefaultAxesYMinorTick','on')

대략 3년 전 | 0

더 보기