Respondida
How do I generate a plot in a vector having symbols?
There are several unknown (not predefined) variables without which it is impossible to get any values and plots, as well. Check ...

casi 5 años hace | 0

Respondida
Solving a wave equation in matlab
Here is a part of your code that is corrected: xstep = 0.1; tstep = 0.05; xstep2 = xstep*xstep; tstep2 = tstep*tstep; alph...

casi 5 años hace | 0

Respondida
How can I take an integer like n=1:1:50 and get the output for each value?
Without knowing the size of your variables and just presuming some variables to be scalar and others to be a vector, here is the...

casi 5 años hace | 0

Respondida
Contour Graph/Plot displays edgy function
The answer to your posed question lies in the formulation of phi and psi. By decreassing the step size by a factor of 10 for ins...

casi 5 años hace | 1

Respondida
c coefficients in pde non constant
Try to use del2() for the Laplacian calcs.

casi 5 años hace | 1

Respondida
Cross-validated model parameters extraction in fitcecoc SVM linear kernel
You should use these fcns instead of crossval: kfoldPredict(), predict(), resubPredict() See for more info: https://www.mat...

casi 5 años hace | 0

Respondida
How do I determine the index for a specific character string based on its relationship with another character string in the same column?
You'd need to perform the following procedures: DATA import (data read) into MATLAB workspace. Advise to use readtable() Emplo...

casi 5 años hace | 0

Respondida
How to find a delay between two similar vectors
Here is one of the possible solution routines: load('J.mat') plot(J2(:,1), J2(:,2:3)) D2=diff(J2(:,2)); D3=diff(J2(:,3)); h...

casi 5 años hace | 0

Respondida
how to substitute multiple variables of syms toolbox into matrix elements using subs function.
Note that you don't need subs instead you'd need to save all calc values in a cell array. Here is the corrected part of your cod...

casi 5 años hace | 0

| aceptada

Respondida
Finite Difference Boundary Condition
One of the possible solutions is to increase the simulation time T from 3 (T = 3) seconds to 5 (T=5) or more seconds.

casi 5 años hace | 0

Respondida
How to draw a graph for function with constraints?
You can consider fplot(): https://www.mathworks.com/help/matlab/ref/fplot.html

casi 5 años hace | 0

Respondida
What should go in a next-generation MATLAB X?
Another good and useful tool for students is to have a built-in function to reset all changes made by a user in preferences and ...

casi 5 años hace | 2

Respondida
What should go in a next-generation MATLAB X?
One of the most common pitfalls for the beginners are how to do correct memory allocation even though MATLAB automatically pinpo...

casi 5 años hace | 0

Respondida
Extracting non zero values from structure variable
Use logical indexing to take out non-zero values from a sturcture array, e.g.: S.m(1) =0.1; S.m(2:5)=0; S.m(6:9)=pi; S.k(1:3)=...

casi 5 años hace | 0

| aceptada

Respondida
Solving for multiple solutions and plotting them
Here is the corrected code: clc; clearvars format short g M1 = 3; P1 = 1; theta2 = 1:1:20; gamma = 1.4; phi = 4.8; syms ...

casi 5 años hace | 0

Respondida
How to mark range of Y values in a plot?
Here is one of the viable ways how you can achieve your goal of simulation: clearvars; close all k=100; % ...

casi 5 años hace | 1

Respondida
using voltage sensor in program code
There are a few different ways to obtain signal readings into matlab workspace. (1) using [out] block (Simulink/Sinks) connecte...

casi 5 años hace | 0

| aceptada

Resuelto


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

casi 5 años hace

Respondida
How to wrap live editor output
Use Preferences, e.g.: >> preferences In Preferences, Editor/Debugger -> Display ...

casi 5 años hace | 1

Respondida
how to I get the equation of polynomial fit into my code
Use these icons to export the fit model into workspace as shown in the Screenshot shown here. Then use the exported fit model...

casi 5 años hace | 0

Respondida
using voltage sensor in program code
(1) Make sure that you have Data Acquisition toolbox installed. And if it is there, then you can check the followings. (2) find...

casi 5 años hace | 0

Respondida
Defining a function for a vector of values, while keeping two variables unknown
% Here is the complete solution syms y z A =1:5; F = @(A, y, z) sum(A+y+z); FF = (F(A, y,z))

casi 5 años hace | 0

Respondida
How to add a .png image to be published as a pdf output file
Note the file extension - Part1.jpg That looks like that in your code the file extension is NOT *.png but *.jpg Your image fi...

casi 5 años hace | 0

Respondida
Defining a function for a vector of values, while keeping two variables unknown
Supposedly, this is what you are trying to achieve: syms y z A = magic(3); F = @(A, y, z) cumsum(A+y+z); FF = (F(A, y,z))

casi 5 años hace | 0

Respondida
dot product and indexing
The explantion is as follows: % Step 1. Comparing every individual value (element of) of NCol row vector (row matrix) % with ...

casi 5 años hace | 0

Respondida
How to add the count of iterations and relative error to the code?
Here are how you can obtain the final iteration and rel./abs error values when the roots are found. function root = newton(fun...

casi 5 años hace | 0

Respondida
I want to solve solution for Equation which is behaving like both ODE and DDE
You can try to employ Laplace and inverse Laplace transforms, laplace() and ilaplace()

casi 5 años hace | 0

Respondida
How do I create a for loop with fields of structures?
You can try to work with fieldnames() and getfield() names, e.g.: Fnames = fieldnames(Global_Data); for ii = 1:length(Fnames) ...

casi 5 años hace | 1

Respondida
Two area three unit thermal power system
In your m-file, one of the variables is not initialized correctly, see: ... b1=0.4249; b2=0. % ERR 4249...

casi 5 años hace | 0

Respondida
Index is out of range when creating 3D arrray
If NUM_data = 40, then your code should sth like this one: ... for n = 1:NUM_data X(:,:,n) = dlmread(list(n)); end ....

casi 5 años hace | 0

Cargar más