回答済み
If v=-10:1:10, why isn't the v>0 case triggered?
You are passing the entire vector v into logic(). Inside logic() you are testing if(v>=0) -- so you were testing the entire vect...

9ヶ月 前 | 1

| 採用済み

回答済み
Displaying command line output in App live
You can use evalc to evaluate code and get back character representation of the output after complete execution of the code. You...

9ヶ月 前 | 0

回答済み
how to convert gray images to rgb
sc = round(rescale(spect,1, 256)); rgbBlock = permute(reshape(map(sc,:), size(sc,1), size(sc,2), [], 3), [1 2 4 3]); rgbBlock ...

9ヶ月 前 | 0

| 採用済み

回答済み
i have written a while loop which displays 'yes' or 'no' if the difference is less than 0.5 for a given problem. how can i write this output into an excel sheet.
data=readtable("DATA.xlsx"); X=table2array(data); i=1; j=2; decisions = strings(0); decision_count = 0; while i<57...

9ヶ月 前 | 0

回答済み
How to automate/solve this process in MATLAB
syms s u eqn = 1472*s^4 - 256*s^2*u^2 + 1392*s^2 - 24*u^2 + 150 == 0 sol = solve(eqn, s, 'maxdegree', 4) We can see by examin...

9ヶ月 前 | 1

| 採用済み

回答済み
Problem using subs function for multiple variables on 2023b
Your theta2 is a symfun so diff(theta2,t) is a symfun, and that makes the entire type_symfun expression into a symfun that retur...

9ヶ月 前 | 1

| 採用済み

回答済み
shift -discrete signal
If you have a fractional delay (as you seem to have -- 1/6 of a sample) then see https://www.mathworks.com/help/dsp/ug/design-o...

9ヶ月 前 | 1

| 採用済み

回答済み
How Can I load 200 images or more image frames via parfor loop?
k = i - start_idx + 1 images(:,:,k) = tmp_img(:,:,1); Inside parfor, the use of the loop control index must be...

9ヶ月 前 | 0

回答済み
Does adding variables to table cause Matlab to re-write the entire table in memory?
No. Internally, tables have a cell array with one cell entry for each variable. The cell array would have to be extended, but th...

9ヶ月 前 | 0

| 採用済み

回答済み
convert struct in class?
class method invocations are generally slower than calling a fixed function name passing in an input. On the other hand, if you...

9ヶ月 前 | 0

| 採用済み

回答済み
Reading the image sequency
%sample name "Field on_1ms_4_8V_60sec-02-Deskew_t001z001c1-2" projectdir = 'name/of/directory/data/files/are/in'; basefilena...

9ヶ月 前 | 0

回答済み
How to set the interval of the solution when I use "vpasolve" to solve an equation?
vpasolve() and pass a list of equations as the first parameter. Pass a list of variables in the second parameter. In the ...

9ヶ月 前 | 0

| 採用済み

回答済み
Solving Inequalities using symbolic tool box
It is common with the symbolic engine that in practice you need to convert inequalities into equalities by introducing a non-neg...

9ヶ月 前 | 1

回答済み
FFT and Fourier series formulas from CSV data file
filename = 'tek0005.csv'; data = readmatrix(filename, 'HeaderLines', 21); time = data(:,1); T = mean(diff(time)); Fs =...

9ヶ月 前 | 0

| 採用済み

回答済み
Matlab-Excel shape PROBLEM
Create a vector containing the number of consecutive elements needed to move into each row. Not the indices, the count. So for e...

9ヶ月 前 | 0

回答済み
Correlation between 2 vectors give a matrix full of Nan
t = linspace(0,1) .'; %COLUMN A=5; f=1; ph1=0; cost=A*cos(pi*f*t+ph1); cost2 = A*cos(2*(pi*f*t+ph1))+1; c = corr(cos...

9ヶ月 前 | 1

回答済み
Array Problem How can I unpack an array? why the firt element pf my array is always 0?
[I1; I2; I3]= I; That code is valid only if I is a function (not function handle) that returns at least 3 outputs. It...

9ヶ月 前 | 0

回答済み
How do I generate a random signal that follows normal distribution of mean value 0 and standard deviation 10 ?
N = 1e7; target_std = 10; target_mean = 0; data = randn(1,N) * target_std + target_mean; %crosscheck mean(data) std(da...

9ヶ月 前 | 0

回答済み
this code fails with one file and one sub-folder https://www.mathworks.com/help/deeplearning/ug/train-deep-learning-network-to-classify-new-images.html#
If you only have one input then splitting is not going to work. Note also that if you only have data for one class then trainin...

9ヶ月 前 | 1

| 採用済み

回答済み
The code is plotting $R_0$ against two parameters
I had to guess about the range of alpha_1 and alpha_3 that you wanted to plot. The contour turns out solid color because the va...

9ヶ月 前 | 0

回答済み
Need help solving and plotting a first order pde
You have the derivative of tau with respect to t, so tau is a function of t. You wish to plot tau vs gamma, so tau is also a fu...

9ヶ月 前 | 1

回答済み
the tranpose of transpose doed not equals the original matrix
You have a broken sparse matrix, probably build by a third-party product, but possibly built by a broken mex file. See a simila...

9ヶ月 前 | 3

| 採用済み

回答済み
wfbm function wierdly crashes for a range of hurst exponent
H-(1/2) is passed to an internal function named alphacfs . In that function I = 1:1000; cka = gamma(alpha+1)./(gamma(I).*ga...

9ヶ月 前 | 0

| 採用済み

回答済み
find the longest diagonal sum of a matrix.
When you press the green Run button, that is equivalent to running the function from the command line with no parameters. When ...

9ヶ月 前 | 0

回答済み
Only perform a function when the working dialog is not closed
See uiwait and waitfor See also questdlg() https://www.mathworks.com/help/matlab/ref/inputdlg.html#d126e819840 in particular th...

9ヶ月 前 | 0

回答済み
What difference does the choice of FIK make?
https://www.mathworks.com/matlabcentral/answers/93105-what-are-the-lm_license_file-and-mlm_license_file-environment-variables-an...

9ヶ月 前 | 0

回答済み
How can i preprocess the rice colored image before applying this code
You need to convert the image to grayscale and save it to 'rice_preprocessed.png' For anything else, you should consider buildi...

9ヶ月 前 | 0

回答済み
I am a university student and this is my university email: redacted@eng.zu.edu.eg Can I get Matlab for free? If possible, how do I get the activation key?
There are three possibilities here: Your university might have arranged with Mathworks to support Mathworks licenses for all el...

9ヶ月 前 | 0

回答済み
How can I find the two intersection points of the x and y axis of two equations in Matlab?
Example with deliberately different equations. You can study the techniques and appy them to your own code. syms x y eqn1 = y ...

9ヶ月 前 | 1

| 採用済み

回答済み
error: Unsupported input format for From Workspace block 'untitled/From Workspace1'. Available formats are double non-complex matrix, a structure with or without time, or a st
When you use From Workspace, then you need to be importing something that has a time component attached to each measurement, suc...

9ヶ月 前 | 0

| 採用済み

さらに読み込む