답변 있음
My loop does not produce the results I want, due to coding errors
I have made numerous corrections in your code. I think this is now at least closer to what you want clc; clear; x0 = 0; y...

6달 전 | 0

| 수락됨

답변 있음
How to plot many figure with For function?
Uncomment the line in your code that assigns the figure number So for i=1:20 figure(i) plot(array(:,1),array(:,i)) end

6달 전 | 0

| 수락됨

답변 있음
How to solve a system of two linear equations in matrix form under a loop /
I'll assume you know how to calculate A and B based upon your c and T values. Then to solve for X use X = M\(J*A + B) Note tha...

6달 전 | 0

답변 있음
Bode diagram for a Butterworth filter
What specific problems or errors are you getting? Here is an example that maybe you can adapt to your situation fs = 1000; % sa...

6달 전 | 0

답변 있음
function for cell array
Here's a simple example % Make an example cell array with a vector in each cell A = cell(2,3); % preallocate for i = 1:2 ...

6달 전 | 0

| 수락됨

답변 있음
Write a function largest () such that it can accept multiple numbers and return the largest item from the given list.
There is already a MATLAB function that "can accept multiple numbers and return the largest one" x = [2,15,23.7,91.4,80.3] % ve...

6달 전 | 0

답변 있음
How can I plot a curve while changing color every N points ?
I was coding up the example below, and by the time I posted I saw you already had an answer from @Cris LaPierre. I will still in...

6달 전 | 0

| 수락됨

답변 있음
fprintf for ~million row string matrix
You could try writecell and see if that is more efficient.

6달 전 | 0

답변 있음
Plotting multiple .txt files
You could do something like what is shown in this simplified example % Get a list of all of the text files list = dir('*.txt...

6달 전 | 1

답변 있음

6달 전 | 0

답변 있음
How can I use the ( nchoosek ) for this case nchoosek(x,y) where x=[1:1:80] , and y=64;
Using b = nchoosek(80,64) You will see that there are approximately 2.6958 E16 ways of choosing 64 elements out of your vecto...

6달 전 | 0

답변 있음
I have a 4 Dimensional Matrix and i want to get its transpose
You can use the MATLAB permute function for this and not use any loops https://www.mathworks.com/help/matlab/ref/permute.html

6달 전 | 1

답변 있음
Modelling a variable (i.e. nonlinear) capacitor in Simulink: how to make it stable?
It looks like you may be using some circuit block set that I don't have available, however just going back to fundamentals you c...

6달 전 | 0

| 수락됨

답변 있음
Matlab fails to launch appdesigner or open .mlapp files
Not really clear what is going on here, but it looks like you have a file called ComponentController.m whose error is preventing...

6달 전 | 0

| 수락됨

답변 있음
Update App GUI with Simulink data in real-time
Please provide a little more context. From what you describe it sounds like your Simulink model has an interpreted MATLAB functi...

6달 전 | 0

답변 있음
How can I find the magnitude of a vector B when I know the unit vector B, the vector A and the result cross product of AXB?
Lets say you have the final Torque, and arm as a three element vectors T, and A respectiviely. Then I think the magnitude of th...

6달 전 | 0

답변 있음
How i can find the difference between 2 values.
y = T1 - T2

6달 전 | 0

답변 있음
command strategy for converting the following multi table text file into matlab array
If you don't know how many rows there are in each data set or where the data rows begin and end then you could do this: % read ...

7달 전 | 0

| 수락됨

답변 있음
How to take the average of 7 rows then other 7 until the data finished and save into new tab of excel
Read the data in using readmatrix. Once you have read the table into an m by 150 array, let's call it A, then just use movmean ...

7달 전 | 1

| 수락됨

답변 있음
I am getting data values as 1 x 100. How to reduce it to 1x6 i.e, require values of y w.r.t x at 0.2 0.4, 0.6, 0.8
I don't have the symbolic toolbox, but in ordinary MATLAB you would use interp1 for this

7달 전 | 1

| 수락됨

답변 있음
How to make a matrix with mixed string and number elements ?
Here's another approach, not so nicely vectorized as @Adam Danz, in which I store the values in a cell array I hadn't known abo...

7달 전 | 0

답변 있음
I think it looks like you are not using the "MATLAB Function" block correctly. If you open that block, maybe you just have the ...

7달 전 | 0

| 수락됨

답변 있음
Table to Array conversion using a for loop
I agree with @Stephen23 comments about not using dynamically named variables, here's another approach, in which you store all of...

7달 전 | 0

| 수락됨

답변 있음
If else -statement doesn't work
Actually you can do this in just one line using MATLAB discretize taAct.actClass = discretize(taAct.Sum,[0,30,40,60,inf]) - 1 ...

7달 전 | 1

| 수락됨

답변 있음
up or down counting based on input signal value
This is one approach, the counter will increment at each sample time of the delay block (z^-1). You can set that parameter in th...

7달 전 | 0

답변 있음
How to reduce the computation time of for loop?
With the code you show, it appears that the values of S1, Sc_win, and S do not change as a function of any of the loop variables...

7달 전 | 0

답변 있음
remove missing entries from cell array
I think you are close, just use new_cell_array= cellfun(@rmmissing,old_cell_array,'UniformOutput',false)

7달 전 | 0

답변 있음
How to return a true/false logical array from a string array of repeating numbers?
x = [3 2 1 5 1 4 0] L = x == 1

7달 전 | 0

답변 있음
Help: Matlab takes forever with unrecognized commands, how can I fix this?
I had this problem and found it was caused by some interaction with "MATLAB Drive" and "MATLAB Drive Connector". As soon as I st...

7달 전 | 0

답변 있음
Creating an image using row number, column number, and corresponding Intensity?
Suppose you have your data as you describe in matrix A, then you could use: B = zeros(256,256); % preallocate array to hold ima...

7달 전 | 0

| 수락됨