回答済み
how to use solve
syms b x a sol=solve ((2*cos(x) - b*(sin(x) + sin(a*x))) == 0,[x a b]) %chooses 'x' as the unknown and returns sol.x sol.a ...

3年弱 前 | 0

| 採用済み

回答済み
I can't run the code I wrote the way I want. Please help me
%Plot P-V diagram of a given substance using peng robinson equation of state %Substance properties are defined by the peng robi...

3年弱 前 | 0

回答済み
Array elements are recalculated every iteration
This is one approach, where you can initialize a variable k and iterate along the time step nRows = ceil(endTime / ep.timestep...

3年弱 前 | 0

回答済み
imshow displays blank figure
img = imread('image.png'); imshow(img); Change the syntax for *imread* as above.

3年弱 前 | 0

回答済み
How to plot performance data based on process ID?
Data = [1680569427 83321 73.3 1680569427 83325 0.0 1680569427 83326 0.0 1680569427 83327 0.0 1680569427 83328 0.0 168056942...

3年弱 前 | 0

| 採用済み

回答済み
Problems with a function of matrix
Call the function from command window and not from inside the script file where you have the code % call the function from com...

3年弱 前 | 0

| 採用済み

回答済み
Index in position 1 is invalid. Array indices must be positive integers or logical values.
Change this line from s = s + v(x,y) * img(k,l); to s = s + v(x,y) * img(abs(k),abs(l)); in your code. The indices become ne...

3年弱 前 | 0

回答済み
Problema al escribir en látex el nombre de un eje
ylabel('$\ddot{z_c}$','Interpreter','latex','fontsize',20)

3年弱 前 | 1

| 採用済み

回答済み
Normalizing an FFT Vector
Try with fftshift function , L = 100; x = linspace(0,L,L+1); psi = sqrt(2/L)*sin(pi*x/L); %particle in a box ground state% ...

3年弱 前 | 1

回答済み
My error says "Unrecognized function or variable 'CP'." What can I add to the script so that I can define it?
None of the if statements for variables IoDR, IoDL are being executed. Can you check if the preceding if conditions for variable...

3年弱 前 | 0

回答済み
Subscript indices must either be real positive integers or logicals always show up. what should i do?
%% Beam Properties L = 0.35; % Length of the beam (m) w = 0.02; % Width of the beam (m) t = 0.002; % thickness ...

3年弱 前 | 0

| 採用済み

回答済み
Calculate normal and shear stress of a beam where values of depth and width are under certain conditions
close all clear clc b = 1:200; d = 1:200; A = 2640; F = 300e3; d_max = 125; b_min = 20; NL = length(b); sigma_max = ...

3年弱 前 | 0

| 採用済み

回答済み
forcing the final column in a matrix to be zero
k = 10 a = ones(3,k) b = -1; if b < 1 a(:,end) = 0; end a

3年弱 前 | 0

| 採用済み

回答済み
Ideal Pressure Sensor, Static Head or Total Head?
The pressure sensor available in Simscape measures the total head or effective head. As you say there is no diameter to evalua...

3年弱 前 | 0

回答済み
How do I make two variables the same number for conditions in a if=else statement?
Following the truth table output for xor and as suggested by @Walter Roberson , you would also need to change the if-else cond...

3年弱 前 | 0

回答済み
How can I change a variable once at a specific point inside of a for loop?
You can change the sign of v_robot variable num_states = 2001; v_robot = 0.1; stdev_odometry = 0.1; delta_t = 0.1; b = zer...

3年弱 前 | 0

回答済み
I am trying to create a function that shows the average grade of an entire class but my answer is in matrix form.
for student=1:Nstudent; ClassAverage(student)=mean(setOfData(:)); end ClassAverage = ClassAverage(1); Add the above line...

3年弱 前 | 0

回答済み
Save .fig file as .eps file
plot(1:10) saveas(gcf,'Linechart','epsc')

3年弱 前 | 0

回答済み
Subscript indices must either be real positive integers or logicals.
[XX,YY] = meshgrid(linspace((Lat1(minlat),(Lat1(maxlat),n),linspace((Lon1(minlon)),(Lon1(maxlon),n))

3年弱 前 | 0

回答済み
How to make x-axis logarithmic for errorbar plot?
Use *semilogx* function

3年弱 前 | 0

回答済み
Boxplot and Plot Overlay Problem
As you say, X, Y1 , Y2 are same size and since Y2 (c) is a vector with mean of each year, plot the graph using the unique va...

3年弱 前 | 0

回答済み
Reynolds stress plot error
clear all; close all; clc; U_inf = 100; % free stream velocity in m/s L = 1; % plate length in m nu = 1.5e-5; % kinematic v...

3年弱 前 | 0

| 採用済み

回答済み
Why am I getting an error for mismatched number of elements?
Few changes that may be required are below. Test your code after those changes x = zeros(n,1); for i = 1:n .. S = ...

3年弱 前 | 0

回答済み
How to pass on arguments in the form of two grids and return a matrix the elements of which involve conditional statements?
N = 4; DT = 1/N; t = linspace(DT/2, 1-DT/2, N)'; r = t + 0.3 * DT; [rr, tt] = ndgrid(r, t); a = f(rr, tt) function ...

3年弱 前 | 0

回答済み
How to extend a vector continuously in a loop
ini_vector=[par.nN2_in par.nH2_in 0 0 0.01 0 0 0 0 0.999]; Initial = repmat(ini_vector,1,8)

3年弱 前 | 0

| 採用済み

回答済み
2D array to 1D with rows appending after another row
A = A.' A(:)

3年弱 前 | 1

回答済み
I need help plotting using this while loop
xx = linspace(-5,9,85); w=0 while w<85 w=w+1; fxx(w) = ((xx(w)+1)^2)./(2+5*xx(w)); end plot(xx,fxx)

3年弱 前 | 1

| 採用済み

回答済み
My Code is giving indexing error, I am unable to fix it.
one way to verify the exact and approximate solutions is to vary boundary conditions suitably , % Clear all variables and clos...

3年弱 前 | 0

回答済み
I am trying to do numerical integration to find the work out in a problem with less than 0.1% error.
From your comments in the code, as i understand if the temperature is < 300K , then efficiency is not possible to evaluate. I h...

3年弱 前 | 0

回答済み
I'm running into an error at line 40, which is prompting me that I have an "invalid or deleted object". I'm wondering how to mend this.
P0 = [1,2,3]; P1 = [2,4,5]; P2 = [3,4,5]; P3 = [50,2,3]; P = [P0;P1;P2;P3]; t = linspace(0,1,100); tint = length(t); A = one...

3年弱 前 | 0

さらに読み込む