Réponse apportée
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 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

Réponse apportée
imshow displays blank figure
img = imread('image.png'); imshow(img); Change the syntax for *imread* as above.

presque 3 ans il y a | 0

Réponse apportée
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...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
Problema al escribir en látex el nombre de un eje
ylabel('$\ddot{z_c}$','Interpreter','latex','fontsize',20)

environ 3 ans il y a | 1

| A accepté

Réponse apportée
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% ...

environ 3 ans il y a | 1

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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 ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
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 = ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
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

environ 3 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
Save .fig file as .eps file
plot(1:10) saveas(gcf,'Linechart','epsc')

environ 3 ans il y a | 0

Réponse apportée
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))

environ 3 ans il y a | 0

Réponse apportée
How to make x-axis logarithmic for errorbar plot?
Use *semilogx* function

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
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 = ...

environ 3 ans il y a | 0

Réponse apportée
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 ...

environ 3 ans il y a | 0

Réponse apportée
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)

environ 3 ans il y a | 0

| A accepté

Réponse apportée
2D array to 1D with rows appending after another row
A = A.' A(:)

environ 3 ans il y a | 1

Réponse apportée
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)

environ 3 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Réponse apportée
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...

environ 3 ans il y a | 0

Charger plus