I need help indexing
조회 수: 5 (최근 30일)
이전 댓글 표시
I need help indexing
function newPriceTable = UpdatePriceTable( origPriceTable, changePrice, colNum )
% UpdatePriceTable: Adds changePrice to column colNum of origPriceTable
% Returns the updated price table newPriceTable
% Inputs: origPriceTable - original price data table
% changePrice - column array of pricing changes
% colNum - specified column of priceTable to update
%
% Outputs: newPriceTable - updated price data table
% Assign newPriceTable with data from priceTable;
newPriceTable = [changePrice]; % FIXME
% Assign newPriceTable column specified by colNum with original price
% data updated by changePrice
newPriceTable = newPriceTable + origPriceTable(:, colNum);
%+ origPriceTable(:, colNum);
%[ 0, 0; 0, 0; ]; % FIXME
end
댓글 수: 4
Stephen23
2017년 10월 27일
편집: Stephen23
2017년 10월 27일
@Blair Hall: no, that is not our question about how to use MATLAB, because that is actually your homework question. We are not a free homework service, nor a free MATLAB tutorial service.
As you have been told many times in your other very similar questions, you actually need to learn how to use MATLAB, and put in some effort yourself. There are plenty of guides and tutorials to help you learn how to use basic MATLAB, and they are easy to find using your favorite internet search engine.
If you have a specific question or your code is doing something unexpected, then we will be happy to help you.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!