回答済み
Using variable legend in a for loop
n0 = 1; lam = 3:0.01:7; a1 = 3.263; b1 = 0.1644; n1 = sqrt(1 + (a1.*(lam.^2))./((lam.^2) - (b1^2))); ns = 1.5; th = 0; i...

3年弱 前 | 0

| 採用済み

回答済み
I got a blank figure while trying to plot the phase space
Choose better initial conditions e.g. for q1 and q2 they are both zero close all D=0.02; r=0.04; A=2.5; B=0.01; z=3.0; C...

3年弱 前 | 1

| 採用済み

回答済み
How can I set the NaN values to black in a pcolor plot?
% Generate sample data data = rand(10, 10); data(3, 3) = NaN; % Set a specific value as NaN % Create the pcolor plot figur...

3年弱 前 | 1

回答済み
App Designal : write string in a culumn "A" in the table
Try below app.UITable.Data = ["fdgfdg" "gg" "ghh" "jjj"] in place of app.UITable.Data = ["fdgfdg" ;"gg" ;"ghh"; "jjj"]

3年弱 前 | 1

回答済み
How to Italicize either of the axis tick labels ?
Use '\it label text' % italic font xticklabels({'\it text1','\it text2'}) % normal (plain) font xticklabels({'text1','tex...

3年弱 前 | 1

| 採用済み

回答済み
Generating an error bar plot with a custom equation fit
If you want to add multiple lines for errorbars i.e. both y data and y data fitted along with their deviations, you can plot the...

3年弱 前 | 0

回答済み
Bringing plots to the "front" to make them more visible?
Use a marker and increase fontsize p2 = plot(x, data, 'k'); p2.Color(4) = 0.2; hold on plot(x, means,'ro','MarkerSize',12,'...

3年弱 前 | 0

回答済み
How to take an integral symbolically and then convert it to type double?
syms t omega real A = rand(1000,1); % specify the integration variable t as the argument I = double(vpa(int(A.*sin(omega*t),t...

3年弱 前 | 0

| 採用済み

回答済み
Replacing sequences in matrix
clear; close all; clc; results = [4 5 6 7 8,9 10 11,12,13, ... 104,105,106,107,108,109,110,111,112,113, ... 204,205,2...

3年弱 前 | 0

回答済み
A line does not appear when I plot
% inside the for loop Temp(h) = q./(6*k_w)*(r_I.^2) + T_sI % outside the for loop Temp(Temp == 0 ) = []; plot(1000:10000,T...

3年弱 前 | 1

| 採用済み

回答済み
Running a function multiple times and recording outputs for each of the runs in one table.
Assuming some random data, the output data can be fit into a table as shown below % some random data data= randi([2 200],12...

3年弱 前 | 1

| 採用済み

回答済み
sinc + cos function plot
Delete pi from below line % delete pi from the below line a = (-4:0.001:4); p = 10; f = p*sinc(a) + cos(a) plot(a,f)

3年弱 前 | 0

| 採用済み

回答済み
Adding fields of two different structs together
part(1) = struct('name', 'x', 'number', 1) part(2) = struct('name', 'y', 'number', 2); part(3) = struct('name', 'z', 'number'...

3年弱 前 | 0

回答済み
Integration with Symbolic Variables
syms theta r a=10; x=a*(1-cos(theta)); y=a*(1-sin(theta)); r=sqrt(x^2+y^2) I = vpaintegral(r,0,2*pi)

3年弱 前 | 0

| 採用済み

回答済み
Only seven lines of code, the program runs continuously without any results when solving the equation
syms I A B = 0.02;%blocking probability N = 8;%number of channels very huge FN = factorial(N); ACell = solve((A^N)/FN == B*s...

3年弱 前 | 0

回答済み
Not your typical vertcat error. Weird behaviour with it.
load("nlworkspace.mat") m1 = parameters(1) m2 = parameters(2) k1 = parameters(3) k2 = parameters(4) d1 = parameters(5) d2 ...

3年弱 前 | 0

| 採用済み

回答済み
Change selected item in ListBox
Assign value as output argument to function ParadigmaAuswahlListBoxValue as shown below, and pass it as input argument to functi...

3年弱 前 | 1

回答済み
Latex en la leyenda de los graficos
you can use the $\hat{u}$ in legend function , The latex interpreter fonts usually appear smaller compared to regular fontsiz...

3年弱 前 | 0

回答済み
How to plot like the following scatter plot on MATLAB?
data = [11,10;10,11;9,10;20,18;10,11;11,10;10,9]; figure; plot(data);grid figure; hold on sz = 100; scatter(1:size(data,1)...

3年弱 前 | 0

回答済み
Error using plot - not enough input arguments / invalid data argument
the variables which are trying to plot are cell array of strings from a table. The plot function call takes NUMERIC (DOUBLE) arr...

3年弱 前 | 1

回答済み
Want Cells in Struct to Show Up as a String
T.data = table(["Apple";"Banana"]) T.data = table2array(table(["Apple";"Banana"])) You can use *table2array* function as a...

3年弱 前 | 0

回答済み
(i) x-and-y scales defined as "log", or (ii) calculate the log of variables, or (iii) loglog
% Method 1 figure plot(1:10, 1:10) ax = gca; % put this after plot call and use as below set(ax,'XScale', 'log', 'YScale',...

3年弱 前 | 0

| 採用済み

回答済み
I want to rounding selected data with Looping and If else
a = rand(1)*randi([5 25],510,1) n=length(a); for i=1:n if(a(i) > 0 & a(i) < 10) a(i) = a(i); else a(i) =...

3年弱 前 | 1

回答済み
Finite Differencing Transient Conduction
May be the central and forward difference schemes are not correct, but the following change will avoid the code errors clc ...

3年弱 前 | 1

| 採用済み

回答済み
How to add zeros diagonally in a matrix?
close all; clear all; clc; A= [0 0 0 1 0 -1 0 -1 -1 0 1 -1 0 0 1 -1 ...

3年弱 前 | 0

回答済み
Don't sort variables(syms) in equation
syms U_L U_Q U_R U_C eqn = "U_L+U_Q+U_C==U_R" displayFormula(eqn)

3年弱 前 | 0

回答済み
Greetings. I recently started using MATLAB. Could you pleas explain me why plot(x1, y , 'm-') is not working?At the same time figure is displayed with the second plot.
% when the input to function is vector of value y = function_y(1:10) function y = function_y(x) var_1 = x.*(1 - log(x)); y ...

3年弱 前 | 0

回答済み
Array indices must be positive integers
assign the func to f inside the custom function as below , probably you mean this f = @(x) x.^3.*exp(-x.^3); a = 0; b = 10; n...

3年弱 前 | 1

回答済み
I wish to limit plotting a point on a single line and not anywhere else on the graph (just on the line) with every input
for M1 = 1:1:5 m = m+1; %================================ % theta-beta-M relat...

3年弱 前 | 0

| 採用済み

回答済み
Using matlabFunction with symbollic expression containing a matrix
Can you tell why you would like to convert the symbolic matrix to anonymous function? The error you get is due to symbolic matri...

3年弱 前 | 0

さらに読み込む